SSL HTTS requests.exceptions.SSLError: HTTPSConnectionPool(host='google.com', port=443)

非 Y 不嫁゛ 提交于 2020-01-21 04:39:07

问题


I don't know why every https request returns this erros

import requests
requests.get('https://google.com')

requests.exceptions.SSLError: HTTPSConnectionPool(host='google.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),))

Even in Isomnia give me an error related with certificates

My os is Windows 7 Professional.


回答1:


requests.get('https://google.com', verify='/path/to/certfile')

or you can skip verifications by doing this:

requests.get('https://google.com', verify=False)

You should specify your CA.



来源:https://stackoverflow.com/questions/51768496/ssl-htts-requests-exceptions-sslerror-httpsconnectionpoolhost-google-com-po

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!