使用 Python 和 Wordpress 的 XMLRPC 的 SSL 问题 [英] SSL issue with XMLRPC using Python and Wordpress
本文介绍了使用 Python 和 Wordpress 的 XMLRPC 的 SSL 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 XMLRPC 从 Python 发布到 Wordpress.该网站具有 SSL,但出现以下错误:
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.
推荐答案
这解决了我的问题.
import sys
if sys.version_info >= (2, 7, 9):
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
这篇关于使用 Python 和 Wordpress 的 XMLRPC 的 SSL 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文