go colly 爬虫博客到wordpress
https://www.aispider.cc
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
燕鹏
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)