mirror of https://github.com/scrapy/scrapy.git
recognize jl extension as jsonlines exporter and update docs
This commit is contained in:
parent
f98bf2c521
commit
5b2faf61c3
|
|
@ -201,15 +201,15 @@ Simplest way to dump all my scraped items into a JSON/CSV/XML file?
|
|||
|
||||
To dump into a JSON file::
|
||||
|
||||
scrapy crawl myspider -o items.json -t json
|
||||
scrapy crawl myspider -o items.json
|
||||
|
||||
To dump into a CSV file::
|
||||
|
||||
scrapy crawl myspider -o items.csv -t csv
|
||||
scrapy crawl myspider -o items.csv
|
||||
|
||||
To dump into a XML file::
|
||||
|
||||
scrapy crawl myspider -o items.xml -t xml
|
||||
scrapy crawl myspider -o items.xml
|
||||
|
||||
For more information see :ref:`topics-feed-exports`
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ Run the spider to extract the data
|
|||
Finally, we'll run the spider to crawl the site and output the file
|
||||
``scraped_data.json`` with the scraped data in JSON format::
|
||||
|
||||
scrapy crawl mininova -o scraped_data.json -t json
|
||||
scrapy crawl mininova -o scraped_data.json
|
||||
|
||||
This uses :ref:`feed exports <topics-feed-exports>` to generate the JSON file.
|
||||
You can easily change the export format (XML or CSV, for example) or the
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ Storing the scraped data
|
|||
The simplest way to store the scraped data is by using the :ref:`Feed exports
|
||||
<topics-feed-exports>`, with the following command::
|
||||
|
||||
scrapy crawl dmoz -o items.json -t json
|
||||
scrapy crawl dmoz -o items.json
|
||||
|
||||
That will generate a ``items.json`` file containing all scraped items,
|
||||
serialized in `JSON`_.
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ FEED_EXPORTERS = {}
|
|||
FEED_EXPORTERS_BASE = {
|
||||
'json': 'scrapy.contrib.exporter.JsonItemExporter',
|
||||
'jsonlines': 'scrapy.contrib.exporter.JsonLinesItemExporter',
|
||||
'jl': 'scrapy.contrib.exporter.JsonLinesItemExporter',
|
||||
'csv': 'scrapy.contrib.exporter.CsvItemExporter',
|
||||
'xml': 'scrapy.contrib.exporter.XmlItemExporter',
|
||||
'marshal': 'scrapy.contrib.exporter.MarshalItemExporter',
|
||||
|
|
|
|||
Loading…
Reference in New Issue