abhishek gattani
abhishek gattani

Reputation: 33

scrapy crawl: error: no such option : -o

When I run the command scrapy crawl openings -o items.json -t json as mentioned in the tutorial, I get:

Usage
=====
  scrapy crawl [options] <spider|url> ...

crawl: error: no such option: -o

I am simply following the scrapy tutorial, when I run the command without the output option it works fine.

scrapy crawl openings 

works fine and I see the crawl output, however it does not work if I want to export the crawl to a JSON.

Searched the web extensively there is no help or mention of this issue.

Upvotes: 2

Views: 2367

Answers (1)

Sjaak Trekhaak
Sjaak Trekhaak

Reputation: 4966

That option is only for the latest version of Scrapy, which can be found on GitHub.

If you are using version 0.12 (latest stable as can be seen on scrapy.org), you should use: scrapy crawl openings --set FEED_URI=items.json --set FEED_FORMAT=json

See also: http://readthedocs.org/docs/scrapy/en/0.12/intro/tutorial.html#storing-the-scraped-data

Upvotes: 7

Related Questions