当前位置: 首页 > 技术研究 > Python > Python url请求提示certificate verify failed unable to get local issuer certificate

Python url请求提示certificate verify failed unable to get local issuer certificate

发布于:2019-3-23 最后更新:2019-10-30 Python 0条评论 7,742 views

当使用requests.get获取https链接时,提示如下错误:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

最方便的手段是直接设置不验证,即:

 requests.get('https://example.com', verify=False) 

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据