I'm trying to create a wordpress post through XMLRPC but getting this error
(env) sam@sam-H81M-S ~ $ python3 Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from wordpress_xmlrpc import Client, WordPressPost >>> from wordpress_xmlrpc.methods.taxonomies import * >>> from wordpress_xmlrpc.methods.posts import * >>> from wordpress_xmlrpc.methods.users import * >>> from wordpress_xmlrpc.methods import * >>> wp_url = '``http://localhost/wordpress``' >>> wp_username = 'admin' >>> wp_password = ' ######## ' >>> post = WordPressPost() >>> post.title = 'My Post' >>> post.content = 'This is content' >>> post.id = client.call(posts.NewPost(post))
Error:Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'client' is not defined
When I use Client I get this error insteadError:Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: call() missing 1 required positional argument: 'method'