SSL issue with XMLRPC using Python and Wordpress

送分小仙女□ 提交于 2019-12-24 21:05:46

问题


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:


This solved my problem.

import sys
if sys.version_info >= (2, 7, 9):
    import ssl
    ssl._create_default_https_context = ssl._create_unverified_context


来源:https://stackoverflow.com/questions/48056116/ssl-issue-with-xmlrpc-using-python-and-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!