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)'),)) html
正確的作法參考文檔資料ide
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warningsui
https://urllib3.readthedocs.io/en/latest/user-guide.html#sslurl
參考博客:http://blog.csdn.net/zahuopuboss/article/details/52964809spa
只要安裝一下幾個requests依賴包就能夠解決此問題.net
pip install cryptography htm
pip install pyOpenSSLblog
pip install certifiip
原文轉至博客:https://blog.csdn.net/qq_31077649/article/details/79013199ssl