Python wordpress xmlrpc -32700 error with wordpress4.8

Viewed 832

i just build a wordpress site and use lasted version 4.8.3

i want to use python-wordpress-xmlrpc module, one year ago i use this is work

but ,when i use QuickStart guide to try connect my wordpress,It Get erorr

i google two day but,not have any ans, i found a issued on module creator git-hub https://github.com/maxcutler/python-wordpress-xmlrpc/issues/110

Look like some people have same error.

that is my code

host = 'http://sample.com'
wp = Client(host+'/xmlrpc.php', 'root', 'password')
print(wp)
r = wp.call(GetPosts())
#Error MEssage xmlrpc.client.Fault: <Fault -32700: 'parse error. not well formed'>

I think maybe is wordpress 4.8 on php7 environment will get error.

have any one can tell me how to fix this problem?

3 Answers

Try this

    from wordpress_xmlrpc import Client, WordPressPost
    from wordpress_xmlrpc.methods import posts

    host = 'http://sample.com'
    wp = Client(host+'/xmlrpc.php', 'root', 'password')
    r = wp.call(posts.GetPosts())
Related