代码:
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))