【python requests错误】Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')"
错误描述:在发送get请求时错误,执行下面一句时报错了:response = requests.get(image_url)原因HTTPSConnectionPool(host='test-kkbuluo-resource.cdn.hzmltest.com', port=443): Max retries exceeded with url: /IMCORE/RESOURCE/LOGO/...
·
错误描述:
在发送get请求时错误,执行下面一句时报错了:
response = requests.get(image_url)
原因HTTPSConnectionPool(host='test-kkbuluo-resource.cdn.hzmltest.com', port=443): Max retries exceeded with url: /IMCORE/RESOURCE/LOGO/GROUP_LOGO/10064004618900176600740980137540-ORIGINAL?version=1568279459281 (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')",),))
原因分析:
因为请求的是https 协议,所以请求禁用证书验证。
解决办法:
增加一些请求参数,verify=False
response = requests.get(image_url,verify=False)
更多推荐
已为社区贡献13条内容
所有评论(0)