mirror of https://github.com/scrapy/scrapy.git
Merge pull request #3882 from MagdalenaDeschner/master
add instructions about how to define output file when running scrapy …
This commit is contained in:
commit
44eb21aa51
|
|
@ -34,15 +34,16 @@ Here's an example showing how to run a single spider with it.
|
|||
# Your spider definition
|
||||
...
|
||||
|
||||
process = CrawlerProcess({
|
||||
'USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)'
|
||||
process = CrawlerProcess(settings={
|
||||
'FEED_FORMAT': 'json',
|
||||
'FEED_URI': 'items.json'
|
||||
})
|
||||
|
||||
process.crawl(MySpider)
|
||||
process.start() # the script will block here until the crawling is finished
|
||||
|
||||
Make sure to check :class:`~scrapy.crawler.CrawlerProcess` documentation to get
|
||||
acquainted with its usage details.
|
||||
Define settings within dictionary in CrawlerProcess. Make sure to check :class:`~scrapy.crawler.CrawlerProcess`
|
||||
documentation to get acquainted with its usage details.
|
||||
|
||||
If you are inside a Scrapy project there are some additional helpers you can
|
||||
use to import those components within the project. You can automatically import
|
||||
|
|
|
|||
Loading…
Reference in New Issue