爬虫用代理 ip 请求的 的时候 请求遇到下面问题,求指教如何解决?

2018-08-20 10:23:26 +08:00
 bestehen
7492 Traceback (most recent call last):
7493 File "/home/shenjianlin/my_project/run.py", line 60, in <module>
7494 run().get_spider()
7495 File "/home/shenjianlin/my_project/run.py", line 56, in get_spider
7496 qimingpian().get_id_and_front_url()
7497 File "/home/shenjianlin/my_project/qimingpian_person/qimingpian_person.py", line 180, in get_id_and_front_url
7498 self.get_agency_content(811018, "http://vip.qimingpian.com/#/detailorg?src=magic&ticket=8577e8587d5d5be8809e3d26a42419ac&id=8fc80fa3b229f9160f1186fb428e1dc7", auth, proxies,user_index)
7499 File "/home/shenjianlin/my_project/qimingpian_person/qimingpian_person.py", line 342, in get_agency_content
7500 proxies=proxies)).text)
7501 File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 559, in post
7502 return self.request('POST', url, data=data, json=json, **kwargs)
7503 File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 512, in request
7504 resp = self.send(prep, **send_kwargs)
7505 File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 622, in send
7506 r = adapter.send(request, **kwargs)
7507 File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 495, in send
7508 raise ConnectionError(err, request=request)
7509 requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
1609 次点击
所在节点    Python
1 条回复
xxxy
2018-08-20 13:53:11 +08:00
可能是你的代理失效了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/481330

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX