Pyhthon Http Request请求出现Caused by SSLError错误

访问https请求时,报出SSl认证失败:

(Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)等错误

解决方法:

方法一:查看python 版本, Ubuntu 默认版本为 python2.7 和 python3.5 ,可以升级python版本为 python3.6.4以上,亲测可行。

方法二:request 请求get和post都有一个参数,忽略ssl认证,在请求语句 中加上参数verify=False

猜你喜欢

转载自blog.csdn.net/qq_39734379/article/details/84580308