exception is this:
File "H:/pythoncode/qiankundanuoyi/test.py", line 43, in
testXMLRPC()
File "H:/pythoncode/qiankundanuoyi/test.py", line 36, in testXMLRPC
wp = Client('http://www.xxxx.com/wordpress/xmlrpc.php', 'myname', 'mypass')
File "build\bdist.win-amd64\egg\wordpress_xmlrpc\base.py", line 24, in init
File "C:\Python27\lib\xmlrpclib.py", line 1240, in call
return self.send(self.name, args)
File "C:\Python27\lib\xmlrpclib.py", line 1599, in request
verbose=self.verbose
File "C:\Python27\lib\xmlrpclib.py", line 1280, in request
return self.single_request(host, handler, request_body, verbose)
File "C:\Python27\lib\xmlrpclib.py", line 1313, in single_request
return self.parse_response(response)
File "C:\Python27\lib\xmlrpclib.py", line 1484, in parse_response
p.feed(data)
File "C:\Python27\lib\xmlrpclib.py", line 558, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: junk after document element: line 1, column 84
We are using this library with WP 4.8 without any issue.
Are you sure your WP is under /wordpress/path?
Looks like your web server is not serving XML response as application/xml content_type.
my website is in wordpress 4.7, when i use this code, my code throw exception code: wp = Client('http://www.xxxx.com/wordpress/xmlrpc.php', 'myname', 'mypass')
exception is this: File "H:/pythoncode/qiankundanuoyi/test.py", line 43, in
testXMLRPC()
File "H:/pythoncode/qiankundanuoyi/test.py", line 36, in testXMLRPC
wp = Client('http://www.xxxx.com/wordpress/xmlrpc.php', 'myname', 'mypass')
File "build\bdist.win-amd64\egg\wordpress_xmlrpc\base.py", line 24, in init
File "C:\Python27\lib\xmlrpclib.py", line 1240, in call
return self.send(self.name, args)
File "C:\Python27\lib\xmlrpclib.py", line 1599, in request
verbose=self.verbose
File "C:\Python27\lib\xmlrpclib.py", line 1280, in request
return self.single_request(host, handler, request_body, verbose)
File "C:\Python27\lib\xmlrpclib.py", line 1313, in single_request
return self.parse_response(response)
File "C:\Python27\lib\xmlrpclib.py", line 1484, in parse_response
p.feed(data)
File "C:\Python27\lib\xmlrpclib.py", line 558, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: junk after document element: line 1, column 84
self._parser.Parse(data, 0), data=
<?xml version="1.0" encoding="UTF-8"?>