(转载)Python 中 post 请求提示 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate

该篇文章转载自:阿泽Anza

问题描述:

发生异常: SSLError
HTTPSConnectionPool(host='***.***.***.***', port=***): Max retries exceeded with url: /***/***/*** (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))

During handling of the above exception, another exception occurred:

During handling of the above exception, another exception occurred:

File "E:\Workplace\VisualStudioCode\***.py", line *, in
res = requests.post(url, data = data)

解决方法:

res = requests.post(url, data = data)
修改为res = requests.post(url, data = data, verify = False)

posted @ 2021-07-14 19:10  摘叶飞镖  阅读(611)  评论(0编辑  收藏  举报