解决 requests.exceptions.SSLError: HTTPSConnectionPool 异常

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

解决办法:

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

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

import urllib3
urllib3.disable_warnings()

加入这两行即可将warning消除

猜你喜欢

转载自www.cnblogs.com/mlllily/p/12134621.html