scrapy spider not found

新建类时需导入settings文件

如下:

from scrapy.utils.projectimport get_project_settings

from scrapy.crawler import CrawlerProcess

crawler = CrawlerProcess(get_project_settings())

crawler.crawl(spidername)

crawler.start()

你可能感兴趣的:(scrapy spider not found)