import requests head = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", "Connection": "close"} html = requests.get("https://fanhao.mmdaren.com/avzuopin/",headers=head) print(html)
这个代码爬百度,淘宝,网易等网站都是正常的,唯有这个网站错误,网上查了好多,有说添加verify=False,有说"Connection": "close",都没有用,求大神帮解决一下
python3.7
# 错误提示
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘fanhao.mmdaren.com‘, port=443): Max retries exceeded with url: /avzuopin/ (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, ‘Unexpected EOF‘)")))
原文地址:https://www.cnblogs.com/shawone/p/10229066.html
时间: 2024-10-07 18:45:33