Scrapy:蜘蛛未找到:eshopscrapy

时间:2016-10-07 08:36:59

标签: python scrapy scrapy-spider

我使用scrapy startproject创建了一个Scrapy项目 它具有以下结构:

MacBook-Pro-2:eshopscrapy tools$ tree 
.
├── crawl.log
├── eshopscrapy
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── items.py
│   ├── pipelines.py
│   ├── settings.py
│   ├── settings.pyc
│   ├── settings.py~
│   ├── spiders
│   │   ├── __init__.py
│   │   ├── __init__.pyc
│   │   ├── eshopsite.py
│   │   └── eshopsite.pyc
│   └── tests
└── scrapy.cfg

当我执行:scrapy crawl eshopscrapy时,我收到此错误:KeyError: 'Spider not found: eshopscrapy'我无法找到我的eshopsite spider中的实际错误。代码如下所示

class EshopsiteSpider(scrapy.Spider):
    name = "eshopsite"

    def parse(self, response):
        yield {'test': response.body }

设置文件应提供开始网址

0 个答案:

没有答案