Scrapy问题_maybeSetHostNameIndication

时间:2018-07-18 14:26:33

标签: web-scraping scrapy

我正在学习草率,当我尝试草率运行时,我遇到了这个问题。

我正在使用默认的scrapy代码。怎么了?

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/Twisted-16.7.0rc2-py2.7-macosx-10.10-x86_64.egg/twisted/internet/defer.py", line 1299, in _inlineCallbacks
    result = g.send(result)
  File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 98, in crawl
    six.reraise(*exc_info)
  File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 80, in crawl
    self.engine = self._create_engine()
  File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 105, in _create_engine
    return ExecutionEngine(self, lambda _: self.stop())
  File "/usr/local/lib/python2.7/site-packages/scrapy/core/engine.py", line 69, in __init__
    self.downloader = downloader_cls(crawler)
  File "/usr/local/lib/python2.7/site-packages/scrapy/core/downloader/__init__.py", line 88, in __init__
    self.middleware = DownloaderMiddlewareManager.from_crawler(crawler)
  File "/usr/local/lib/python2.7/site-packages/scrapy/middleware.py", line 58, in from_crawler
    return cls.from_settings(crawler.settings, crawler)
  File "/usr/local/lib/python2.7/site-packages/scrapy/middleware.py", line 34, in from_settings
    mwcls = load_object(clspath)
  File "/usr/local/lib/python2.7/site-packages/scrapy/utils/misc.py", line 44, in load_object
    mod = import_module(module)
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/site-packages/scrapy/downloadermiddlewares/retry.py", line 24, in <module>
    from scrapy.core.downloader.handlers.http11 import TunnelError
  File "/usr/local/lib/python2.7/site-packages/scrapy/core/downloader/handlers/http11.py", line 27, in <module>
    from scrapy.core.downloader.tls import openssl_methods
  File "/usr/local/lib/python2.7/site-packages/scrapy/core/downloader/tls.py", line 53, in <module>
    from twisted.internet._sslverify import _maybeSetHostNameIndication
ImportError: cannot import name _maybeSetHostNameIndication

0 个答案:

没有答案