KeyError: 'Spider not found: test'

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 15:53   1548   0

Error Msg:

  File "c:\python36\lib\site-packages\scrapy\cmdline.py", line 157, in _run_command
    cmd.run(args, opts)
  File "c:\python36\lib\site-packages\scrapy\commands\crawl.py", line 57, in run
    self.crawler_process.crawl(spname, **opts.spargs)
  File "c:\python36\lib\site-packages\scrapy\crawler.py", line 170, in crawl
    crawler = self.create_crawler(crawler_or_spidercls)
  File "c:\python36\lib\site-packages\scrapy\crawler.py", line 198, in create_crawler
    return self._create_crawler(crawler_or_spidercls)
  File "c:\python36\lib\site-packages\scrapy\crawler.py", line 202, in _create_crawler
    spidercls = self.spider_loader.load(spidercls)
  File "c:\python36\lib\site-packages\scrapy\spiderloader.py", line 71, in load
    raise KeyError("Spider not found: {}".format(spider_name))
KeyError: 'Spider not found: test'

问题:

  spider中定义的爬虫名字和使用的爬虫名字不符

解决:

  修改正确

转载于:https://www.cnblogs.com/hpcm/p/9779738.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP