maxcutler / python-wordpress-xmlrpc

Python library for WordPress XML-RPC integration
http://python-wordpress-xmlrpc.rtfd.org
MIT License
382 stars 130 forks source link

xmlrpclib.ProtocolError: <ProtocolError for blog.example.com/xmlrpc.php: 403 Forbidden> #69

Closed jonathan-s closed 9 years ago

jonathan-s commented 9 years ago

I stumbled upon this problem. According to this post on stackoverflow it's due to the agent not being accepted. So I subclassed the Transport class into this:

class SpecialTransport(Transport):
    user_agent = ('Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31')

However I now get the error described in issue #65, despite having https in the url. So I'm not sure what's happening really.

maxcutler commented 9 years ago

For HTTPS connections, you should use SafeTransport as your base class. Per the documentation for xmlrpclib this is what Python does by default.

jonathan-s commented 9 years ago

Ok, SafeTransport solved that problem. The 403 forbidden problem is still there though.

jonathan-s commented 9 years ago

Issue solved, apparently it was a password issue.