SSL issue with XMLRPC using Python and Wordpress

2019-08-23 03:50发布

I am attempting to use XMLRPC to post from Python to Wordpress. The website has SSL and I am getting the following error:

SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:720)

I have spent almost a full day trying to resolve this, but cannot figure it out. Can anyone help? Thanks.

1条回答
狗以群分
2楼-- · 2019-08-23 04:21

This solved my problem.

import sys
if sys.version_info >= (2, 7, 9):
    import ssl
    ssl._create_default_https_context = ssl._create_unverified_context
查看更多
登录 后发表回答