Passing Arguments To Process.crawl In Scrapy Python
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 : import scrapy from l
Solution 1:
pass the spider arguments on the process.crawl
method:
process.crawl(spider, input='inputargument', first='James', last='Bond')
Solution 2:
You can do it the easy way:
from scrapy import cmdline
cmdline.execute("scrapy crawl linkedin_anonymous -a first=James -a last=Bond -o output.json".split())
Post a Comment for "Passing Arguments To Process.crawl In Scrapy Python"