Automating Wordpress Posts

Programatically posting to wordpress saves a TON of time, no more outsourcing.  My prefered method of posting to wordpress is via xml-rpc, NOT sql injection.  Michele Ferretti has developed an excellent library for controlling wordpress in such a matter.  Wordpresslib allows you to;  publish new posts, edit old posts, publish draft posts, delete posts, change post categories, get blog and user informations, upload multimedia files like movies or photos, get last recents post, get last post, get Trackbacks of posts, get Pingbacks of posts.

Automatically Posting To Wordpress

import wordpresslib

url = 'http://www.MYDOMAIN.com/xmlrpc.php'
wp = wordpresslib.WordPressClient(url, 'USERNAME', 'PASSWORD')
wp.selectBlog(0)
post = wordpresslib.WordPressPost()
post.title = 'Sample Post'
post.description = 'Sample Content'
idPost = wp.newPost(post, True)

Leave a comment

You must be logged in to post a comment.