requests.exceptions.ConnectionError:HTTPSConnectionPool(host

requests.exceptions.ConnectionError: HTTPSConnectionPool(host=

应用场景(爬虫一)

使用requests.get()请求链接报错,具体不知为何好像是请求头的问题(建议换请求头或不用请求头, 本人是没用请求头,总之换代理或UA)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='127.0.0.1', port=443):
Max retries exceeded with url:
/?cdn=nohost (Caused by NewConnectionError
(':
Failed to establish a new connection: [Errno 111] Connection refused',))

应用场景(爬虫二)

下面这种是利用appium抓时报的错误。因appium服务器没有开,或者链接错误

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=4723): 
Max retries exceeded with url: 
/wd/hub/session (Caused by NewConnectionError
(':
Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。',))

应用场景(爬虫三)

2020-03-12 出现原因,本人测试开了十个线程访问一个谷歌,导致ip被封了
本人换了ip 果断解决了

requests.exceptions.ConnectionError: 
HTTPSConnectionPool(host='play.google.com', port=443): 
Max retries exceeded with url: /store/apps/details?id=com.*****.india 
(Caused by NewConnectionError(': 
Failed to establish a new connection: [WinError 10060] 
由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。',))

应用场景(web 三)

同一宿主机的不同dorcker环境不经过配置不能通信
(2018-10-25)检查docker下环境配置,当时不同环境下配置的主机IP为localhost所以报这个错误。

requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8888):
Max retries exceeded with url: /v2/task/accept/ 
(Caused by NewConnectionError(':
Failed to establish a new connection: [Errno 111] Connection refused',))

(2019-11-07又出现了错误)这次因为端口的问题报了这个错误

HTTPConnectionPool(host='', port=8888): Max retries exceeded with url:
(Caused by NewConnectionError(':
  Failed to establish a new connection: [Errno 110] Connection timed out',))

(2020-01-02又出现了错误)这次因为程序中导包的问题报,导致此错误,导包路径不正确

[Error:] 获取***信息失败,错误信息:HTTPConnectionPool(host='192.168.1**.**', port=8080): 
Max retries exceeded with url: ***** 
(Caused by NewConnectionError(': 
Failed to establish a new connection: [Errno 111] Connection refused',))

如有疑问请留言,欢迎批评指正

你可能感兴趣的:(p爬虫)