Issue
Here is an example in scrapy document:
$ curl http://localhost:6800/schedule.json -d project=myproject -d spider=somespider -d setting=DOWNLOAD_DELAY=2 -d arg1=val1
But if I want to set both DOWNLOAD_DELAY = 2 and CONCURRENT_REQUESTS = 4, how to do? And how to do it with urllib2?
Solution
There are two solutions.
First one, try this:
$ curl http://localhost:6800/schedule.json -d project=myproject -d spider=somespider -d setting=DOWNLOAD_DELAY=2 -d setting=CONCURRENT_REQUESTS=4 -d arg1=val1
Second one: New a file named settings.py
in myproject
folder(the directory with the pipelines.py
and items.py
). And put all your settings in it. Here's an example.
Answered By - Java Xu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.