推荐学习书目
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
chendajun
V2EX  ›  Python

scrapy 抓取网站报错,本地抓取没问题,部署到服务器上就报错

  •  
  •   chendajun · Oct 29, 2016 · 5200 views
    This topic created in 3500 days ago, the information mentioned may be changed or developed.
    File "/usr/local/python3/lib/python3.5/site-packages/scrapy/core/downloader/middleware.py", line 43, in process_request
    defer.returnValue((yield download_func(request=request,spider=spider)))
    twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'SSL23_READ', 'ssl handshake failure')]>]
    2016-10-29 13:31:29 [scrapy] INFO: Closing spider (finished)
    2016-10-29 13:31:29 [scrapy] INFO: Dumping Scrapy stats:
    {'downloader/exception_count': 6,
    'downloader/exception_type_count/twisted.web._newclient.ResponseNeverReceived': 6,
    'downloader/request_bytes': 1824,
    'downloader/request_count': 6,
    'downloader/request_method_count/GET': 6,
    'finish_reason': 'finished',
    'finish_time': datetime.datetime(2016, 10, 29, 5, 31, 29, 645084),
    'ip': None,
    'log_count/DEBUG': 7,
    'log_count/ERROR': 2,
    'log_count/INFO': 24,
    'open_time': '2016-10-29 13:28:28',
    'post_item': 0,
    'scheduler/dequeued/redis': 3,
    'scheduler/enqueued/redis': 3,
    'site': 'YouTube',
    'start_time': datetime.datetime(2016, 10, 29, 5, 28, 28, 85879)}
    2016-10-29 13:31:29 [scrapy] INFO: Spider closed (finished)
    6 replies    2016-10-29 21:28:00 +08:00
    knightdf
        1
    knightdf  
       Oct 29, 2016
    twisted.web._newclient.ResponseNeverReceived, 你服务器上可以访问 youtube?
    chendajun
        2
    chendajun  
    OP
       Oct 29, 2016
    @knightdf 可以的,服务器在香港。现在时不时的可以抓取。就是不稳定。
    loalj
        3
    loalj  
       Oct 29, 2016
    chendajun
        4
    chendajun  
    OP
       Oct 29, 2016
    @loalj 怎么解决呢?
    loalj
        5
    loalj  
       Oct 29, 2016   ❤️ 1
    @chendajun 链接里边不是有解决方案么,仔细看啊。
    chendajun
        6
    chendajun  
    OP
       Oct 29, 2016
    @loalj 看了,没有解决问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2665 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 12:19 · PVG 20:19 · LAX 05:19 · JFK 08:19
    ♥ Do have faith in what you're doing.