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
('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f81968ac470>:
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
('<urllib3.connection.HTTPConnection object at 0x0000000003517D68>:
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('<urllib3.connection.VerifiedHTTPSConnection object at 0x000000000382D550>: 
Failed to establish a new connection: [WinError 10060] 
由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。',))

2021-01-06 公司网络访问不通,手机网络能访问; 手机开个热点电脑连接,测试一下通了。尴尬不

HTTPConnectionPool(host='****.gov.cn', port=80): 
Max retries exceeded with url: /sx/list/96
(Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x117f28780>,
'Connection to ***.gov.cn timed out. (connect timeout=20)'))

2021-03-24

requests.exceptions.HTTPError: 404 Client Error: Not Found for url

应用场景(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('<urllib3.connection.HTTPConnection object at 0x7f93f399ceb8>:
Failed to establish a new connection: [Errno 111] Connection refused',))

(2019-11-07又出现了错误)这次因为端口的问题报了这个错误
2022-08-16 增加说明 服务端: 不通、检查端口等配置、网络、telnet。爬虫:网络、长城问题。

HTTPConnectionPool(host='', port=8888): Max retries exceeded with url:
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1682cddc50>:
  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('<urllib3HTTPConnection object at 0x7f352f46c1d0>: 
Failed to establish a new connection: [Errno 111] Connection refused',))

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

评论 18
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

风华浪浪

讨个老婆本呗

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值