python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool
Posted 不再悲伤
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool相关的知识,希望对你有一定的参考价值。
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘www.baidu.com‘, port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)‘),))
正确的做法参考文档资料
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl
参考博客:http://blog.csdn.net/zahuopuboss/article/details/52964809
只要安装一下几个requests依赖包就可以解决此问题
pip install cryptography
pip install pyOpenSSL
pip install certifi
原文转至博客:https://blog.csdn.net/qq_31077649/article/details/79013199
以上是关于python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool的主要内容,如果未能解决你的问题,请参考以下文章
python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool
python 访问网站时报错:requests.exceptions.SSLError: HTTPSConnectionPool
Python 用urllib.request获取页面代码时报错<urlopen error no host given>
google sheets写入数据时报错:Request had insufficient authentication scopes
python异常处理时报错,提示:HTTPError: HTTP Error 404: Not Found
使用git提交时报错:error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity