go colly 爬虫博客到wordpress
https://www.aispider.cc
您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
燕鹏
1c4a575eaa
|
3 年前 | |
---|---|---|
spider | 3 年前 | |
wordpress | 3 年前 | |
README.md | 3 年前 | |
go.mod | 3 年前 | |
main.go | 3 年前 |
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)