未知命令:抓取错误
我在64位操作系统上运行32位python 2.7.3版本。(我尝试了64位,但没有锻炼)。
我按照教程进行操作,并在我的机器上安装了scrapy。我创建了一个项目,demoz。但是,当我输入scrapy crawl demoz
时显示错误。当我在(C:\ python27 \ scripts)下点击scrapy命令时,我发现了这件事:
C:\Python27\Scripts>scrapyScrapy 0.14.2 - no active project
Usage:
scrapy <command> [options] [args]
Available commands:
fetch Fetch a URL using the Scrapy downloader
runspider Run a self-contained spider (without creating a project)
settings Get settings values
shell Interactive scraping console
startproject Create new project
version Print Scrapy version
view Open URL in browser, as seen by Scrapy
Use "scrapy <command> -h" to see more info about a command
C:\Python27\Scripts>
我想他们是安装中缺少的东西,任何人都可以帮忙..在此先感谢..
回答:
你应该scrapy crawl spider_name
在scrapy.cfg
文件所在的scrapy项目文件夹中运行命令。
从文档:
`Crawling
为了使我们的spider工作,请转到项目的顶级目录并运行:
`scrapy crawl dmoz``
以上是 未知命令:抓取错误 的全部内容, 来源链接: utcz.com/qa/411713.html