安装好scrapy ,按照官方例程运行,报错如下:

1
2
3
4
5
6
7
8
9
10
E:\casp\tutorial\tutorial>scrapy crawl dmoz
E:\casp\tutorial\tutorial\spiders\dmoz_spider.py:3: ScrapyDeprecationWarning: Module `scrapy.spider` is deprecated, use `scrapy.spiders` instead
from scrapy.spider import Spider
2016-03-12 19:26:54 [scrapy] INFO: Scrapy 1.0.5 started (bot: tutorial)
2016-03-12 19:26:54 [scrapy] INFO: Optional features available: ssl, http11
2016-03-12 19:26:54 [scrapy] INFO: Overridden settings: {‘NEWSPIDER_MODULE’: ‘tutorial.spiders’, ‘SPIDER_MODULES’: ['tutorial.spiders'], ‘ROBOTSTXT_OBEY’: True, ‘BOT_NAME’: ‘tutorial’}
2016-03-12 19:26:54 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, LogStats, CoreStats, SpiderState
Unhandled error in Deferred:
2016-03-12 19:26:54 [twisted] CRITICAL: Unhandled error in Deferred:
2016-03-12 19:26:54 [twisted] CRITICAL:

其中一个原因是pywin32的版本问题,Python版本分为32bit和64bit,pywin32需要用对应的版本才可以。

× 请打赏~
打赏二维码