go colly 爬虫博客到wordpress https://www.aispider.cc
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
燕鹏 1c4a575eaa aiprose 爬虫成功 4年前
spider aiprose 爬虫成功 4年前
wordpress aiprose 爬虫成功 4年前
README.md init 4年前
go.mod aiprose 爬虫成功 4年前
main.go aiprose 爬虫成功 4年前

README.md

Introduction

An implementation of the standard WordPress API methods is provided,Use the https://github.com/kolo/xmlrpc library as client.

Todo List

  • wp.newPost
  • wp.getPost
  • wp.getPosts
  • wp.editPost
  • wp.deletePost

Usage

  • wp.newPost

    c, err := xmlrpc.NewClient(`https://example.com/xmlrpc.php`, xmlrpc.UserInfo{
    	`your username`,
    	`your password`,
    })
    if err != nil {
    	log.Fatalln(err)
    }
    p := wordpress.NewPost(`content`, `title`, []string{`tag1`, `tag2`}, []string{`cate1`, `cate2`})
    blogID, err := c.Call(p)
    if err != nil {
    	log.Println(err)
    }
    log.Println(blogID)