Marco Dinatsoli
Marco Dinatsoli

Reputation: 10590

scrapy spider pass parameters

I have a spider like this

def __init__(self, FirstDateString, LastDateString):

and I called if from my CMD like this:

scrapy crawl Test -a FirstDateString=1st February 2014 -a LastDateString=31th January 2014

but I get this exception:

  scrapy crawl [options] <spider>

crawl: error: running 'scrapy crawl' with more than one spider is no longer supp
orted

Help please

Upvotes: 2

Views: 607

Answers (1)

paul trmbrth
paul trmbrth

Reputation: 20748

You should use quotes around your argument values:

scrapy crawl Test -a FirstDateString="1st February 2014" -a LastDateString="31th January 2014"

Upvotes: 3

Related Questions