关于requests.exceptions.ConnectionError: HTTPSConnectionPool的问题
作者:互联网
错误如下:
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='wwww.baidu.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001AEB4A86E48>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))
我爬的网站是百度,主要原因是百度做了反爬虫机制,因此需要把headers里面的key值都加上
标签:HTTPSConnectionPool,ConnectionError,request,exceptions,requests,连接 来源: https://www.cnblogs.com/heguihui/p/10482559.html