wordpress通过XMLRPC发布文章

代码:


from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import NewPost
from datetime import datetime
wp = Client('https://www.xacisco.net/blog/xmlrpc.php', 'xxx', 'xxx')
post = WordPressPost()
post.title = "time stamp test"
post.content = "text"
post.post_status = 'future'
post.date = datetime(2013, 11, 14, 20, 34, 2, 860000)

wp.call(NewPost(post))

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注