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

发布于:2019-03-23 更新于:2019-10-30 Python 0条评论

当使用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 来减少垃圾评论。了解你的评论数据如何被处理