Reputation: 61
I'm new to Scrapy and I'm walking through the Scrapy tutorial. I've been able to create my project by using windows7. my scrapy is installed in the path like this:
C:\Program Files\python2.7\scripts.
I construct a project called yuan by scrapy startproject yuan, but when I try to run the project by scrapy crawl yuan, there is an error:"unknown command crawl".
I tried to execute it in the"yuan" project where I can see the file "scrapy.cfg",
C:\Program Files\python2.7\scipts\yuan\scrapy crawl yuan,
there is another error:
"scrapy is not recognized as an internal or external command, operable program or batch file"
I am sure I have changed my path environmental variables, I have added
"C:\Program Files\python2.7\scripts" and "C:\Program Files\python2.7"
into the path variables.
How can I deal with this problem?
Upvotes: 2
Views: 13887
Reputation: 11
You can try this:
cd C:\Program Files\python2.7\scipts\yuan
scrapy crawl yuan
If you run crawl command outside of a project, scrapy will raise "unknown command crawl" error.
Upvotes: 1
Reputation: 8154
Global commands:
startproject
settings
runspider
shell
fetch
view
version
Project-only commands:
crawl
check
list
edit
parse
genspider
deploy
bench
Scrapy has two different type of commands as listed above.
In your case Crawl
is a project only command. So you have to navigate to your project and execute the crawl
command.
Cd <your project>
scrapy crawl <Project name>
Upvotes: 3