scrapy项目没有执行

时间:2016-04-28 19:39:46

标签: python scrapy scrapy-spider

我通过pip在我的mac上安装了scrapy,并且能够成功安装它,还安装了最新的python版本。

到目前为止一切顺利。

我发现这个项目正在尝试运行:

https://github.com/anuvrat/soccerstats

弃用代码存在一些问题(ScrapyDeprecationWarning:模块scrapy.contrib.spiders已弃用,请改用scrapy.spiders

我能够修复,

然而试图运行它我得到这些错误:

Traceback (most recent call last):
  File "/usr/local/bin/scrapy", line 11, in <module>
    sys.exit(execute())
  File "/usr/local/lib/python2.7/site-packages/scrapy/cmdline.py", line 143, in execute
    _run_print_help(parser, _run_command, cmd, args, opts)
  File "/usr/local/lib/python2.7/site-packages/scrapy/cmdline.py", line 89, in _run_print_help
    func(*a, **kw)
  File "/usr/local/lib/python2.7/site-packages/scrapy/cmdline.py", line 150, in _run_command
    cmd.run(args, opts)
  File "/usr/local/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 57, in run
    self.crawler_process.crawl(spname, **opts.spargs)
  File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 150, in crawl
    crawler = self._create_crawler(crawler_or_spidercls)
  File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 165, in _create_crawler
    spidercls = self.spider_loader.load(spidercls)
  File "/usr/local/lib/python2.7/site-packages/scrapy/spiderloader.py", line 40, in load
    raise KeyError("Spider not found: {}".format(spider_name))
KeyError: 'Spider not found: whoscored'

我用scrapy crawl whoscored

执行了它

我没有python scrapy的经验,所以我在这里有点迷失。谁能解释一下我做错了什么?

1 个答案:

答案 0 :(得分:2)

蜘蛛名称区分大小写。 scrapy crawl WhoScored应该有用。