Created
June 1, 2009 13:35
-
-
Save lele85/121405 to your computer and use it in GitHub Desktop.
wordpress_comment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xmlrpclib | |
class comment: | |
def __init__(self, content, author, author_url, author_email, comment_parent = 0): | |
self.comment_parent = comment_parent | |
self.content = content | |
self.author = author | |
self.author_url = author_url | |
self.author_email = author_email | |
blog_id = 0 | |
username = "py-xmlrpc" | |
password = "pythonexample" | |
post_id = 15 | |
newcomment = comment("Hello world", "py-xmlrpc", "http://lele85.netsons.org/blog", "[email protected]") | |
server = xmlrpclib.ServerProxy('http://lele85.netsons.org/blog/xmlrpc.php') | |
server.wp.newComment(blog_id, username, password, post_id, newcomment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment