Passing arguments to process.crawl in Scrapy python

后端 未结 3 459
囚心锁ツ
囚心锁ツ 2020-12-14 06:33

I would like to get the same result as this command line : scrapy crawl linkedin_anonymous -a first=James -a last=Bond -o output.json

My script is as follows :

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 07:06

    pass the spider arguments on the process.crawl method:

    process.crawl(spider, input='inputargument', first='James', last='Bond')
    

提交回复
热议问题