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
chendajun
V2EX  ›  Python

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

  •  
  •   chendajun · 2016-10-29 13:38:41 +08:00 · 4626 次点击
    这是一个创建于 2735 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 条回复    2016-10-29 21:28:00 +08:00
    knightdf
        1
    knightdf  
       2016-10-29 15:13:00 +08:00
    twisted.web._newclient.ResponseNeverReceived, 你服务器上可以访问 youtube?
    chendajun
        2
    chendajun  
    OP
       2016-10-29 15:33:58 +08:00
    @knightdf 可以的,服务器在香港。现在时不时的可以抓取。就是不稳定。
    loalj
        3
    loalj  
       2016-10-29 15:39:56 +08:00
    chendajun
        4
    chendajun  
    OP
       2016-10-29 15:42:56 +08:00
    @loalj 怎么解决呢?
    loalj
        5
    loalj  
       2016-10-29 21:05:07 +08:00   ❤️ 1
    @chendajun 链接里边不是有解决方案么,仔细看啊。
    chendajun
        6
    chendajun  
    OP
       2016-10-29 21:28:00 +08:00
    @loalj 看了,没有解决问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1433 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:53 · PVG 07:53 · LAX 16:53 · JFK 19:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.