解决 requests.exceptions.SSLError: HTTPSConnectionPool 异常

有些网页,用脚本语言(python)访问的时候可能会报 requests.exceptions.SSLError 异常

解决办法:

在 requests.get 请求中加入 verify=False 参数即可解决

 

但是这样修改之后应该还会出现很多 warning

import urllib3
urllib3.disable_warnings()

加入这两行即可将warning消除

posted on 2020-01-02 18:42  mlllily  阅读(7158)  评论(1编辑  收藏  举报