V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
bestehen
V2EX  ›  Python

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

  •  
  •   bestehen · 2018-08-20 10:23:26 +08:00 · 1587 次点击
    这是一个创建于 2288 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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("''",))
    xxxy
        1
    xxxy  
       2018-08-20 13:53:11 +08:00
    可能是你的代理失效了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1052 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:10 · PVG 07:10 · LAX 15:10 · JFK 18:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.