1

I am pretty new at Python and webscraping. I want to use scrapy. I am following the official tutorial. I have created a project, but I type
scrapy crawl quotes
An error comes out:
Unknown command: crawl
What should I do?

DFAB93
  • 13
  • 4

1 Answers1

1

crawl is one of scrapy's subcommands that must be executed from inside a project.
If you attempt to run it while you're not inside one, you get that error.

The error message does seem misleading, suggesting that the command doesn't exist, but if you take a look at how the command line interface is generated in cmdline.py, you will see that that is technically correct.

stranac
  • 26,638
  • 5
  • 25
  • 30
  • thanks a lot, I have tried to use the command ``scrapy crawl quotes`` at different levels of the directory. But still it is not working and giving me: ``Unable to create process using 'C:\Users\USER\python.exe C:\Users\USER\Anaconda3\scrapy-script.py '`` – DFAB93 Jan 25 '18 at 09:25
  • Indeed it seems the ``scrapy`` command works only in the ``\Scripts`` directory – DFAB93 Jan 25 '18 at 09:57
  • In that case, it seems like an anaconda issue. Unfortunately I know next to nothing about anaconda, so I can't help with that part. – stranac Jan 25 '18 at 12:55