爬取数据时出现raise ValueError, "unknown url type: %s" % self.__original

解决raise ValueError, “unknown url type: %s” % self.__original

2019-02-13 12:10:26 [scrapy.utils.log] INFO: Scrapy 1.5.2 started (bot: tencent)
2019-02-13 12:10:26 [scrapy.utils.log] INFO: Versions: lxml 4.2.5.0, libxml2 2.9.5, cssselect 1.0.3,
parsel 1.5.1, w3lib 1.20.0, Twisted 18.9.0, Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15)
[MSC v.1915 64 bit (AMD64)], pyOpenSSL 19.0.0 (OpenSSL 1.1.0i 14 Aug 2018), cryptography 2.4.1, Pl
atform Windows-10-10.0.17134-SP0
2019-02-13 12:10:26 [scrapy.crawler] INFO: Overridden settings: {‘BOT_NAME’: ‘tencent’, ‘NEWSPIDER_M
ODULE’: ‘tencent.spiders’, ‘ROBOTSTXT_OBEY’: True, ‘SPIDER_MODULES’: [‘tencent.spiders’]}
2019-02-13 12:10:26 [scrapy.extensions.telnet] INFO: Telnet Password: 58ad33801ee2de5c
2019-02-13 12:10:26 [scrapy.middleware] INFO: Enabled extensions:
[‘scrapy.extensions.corestats.CoreStats’,
‘scrapy.extensions.telnet.TelnetConsole’,
‘scrapy.extensions.logstats.LogStats’]
Unhandled error in Deferred:
2019-02-13 12:10:27 [twisted] CRITICAL: Unhandled error in Deferred:

Traceback (most recent call last):
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawl
er.py”, line 171, in crawl
return self._crawl(crawler, *args, **kwargs)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawl
er.py”, line 175, in _crawl
d = crawler.crawl(*args, **kwargs)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\twisted\inte
rnet\defer.py”, line 1613, in unwindGenerator
return _cancellableInlineCallbacks(gen)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\twisted\inte
rnet\defer.py”, line 1529, in _cancellableInlineCallbacks
_inlineCallbacks(None, g, status)
— —
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\twisted\inte
rnet\defer.py”, line 1418, in _inlineCallbacks
result = g.send(result)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawl
er.py”, line 80, in crawl
self.engine = self._create_engine()
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawl
er.py”, line 105, in create_engine
return ExecutionEngine(self, lambda : self.stop())
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\core
engine.py”, line 69, in init
self.downloader = downloader_cls(crawler)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\core
downloader_init
.py", line 88, in init
self.middleware = DownloaderMiddlewareManager.from_crawler(crawler)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\middl
eware.py”, line 58, in from_crawler
return cls.from_settings(crawler.settings, crawler)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\middl
eware.py”, line 34, in from_settings
mwcls = load_object(clspath)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\utils
\misc.py”, line 44, in load_object
mod = import_module(module)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\importlib_init
.py", li
ne 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

File “

File “

File “

File “

File “

File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\downl
oadermiddlewares\httpproxy.py”, line 5, in
from urllib2 import _parse_proxy
builtins.SyntaxError: invalid syntax (urllib2.py, line 246)

2019-02-13 12:10:27 [twisted] CRITICAL:
Traceback (most recent call last):
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\twisted\inte
rnet\defer.py”, line 1418, in _inlineCallbacks
result = g.send(result)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawl
er.py”, line 80, in crawl
self.engine = self._create_engine()
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawl
er.py”, line 105, in create_engine
return ExecutionEngine(self, lambda : self.stop())
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\core
engine.py”, line 69, in init
self.downloader = downloader_cls(crawler)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\core
downloader_init
.py", line 88, in init
self.middleware = DownloaderMiddlewareManager.from_crawler(crawler)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\middl
eware.py”, line 58, in from_crawler
return cls.from_settings(crawler.settings, crawler)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\middl
eware.py”, line 34, in from_settings
mwcls = load_object(clspath)
File “c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\scrapy\utils
\misc.py”, line 44, in load_object
mod = import_module(module)
File "c:\users\administrator\appdata\local\programs\python\python37\lib\importlib_init
.py", li
ne 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

你可能感兴趣的:(爬取错误,爬取数据时出现,ValueError,"unknown,url)