English 中文(简体)
Scrapy - Scraped Data
  • 时间:2024-11-05

Scrapy - Scraped Data


Previous Page Next Page  

Description

The best way to store scraped data is by using Feed exports, which makes sure that data is being stored properly using multiple seriapzation formats. JSON, JSON pnes, CSV, XML are the formats supported readily in seriapzation formats. The data can be stored with the following command −

scrapy crawl dmoz -o data.json

This command will create a data.json file containing scraped data in JSON. This technique holds good for small amount of data. If large amount of data has to be handled, then we can use Item Pipepne. Just pke data.json file, a reserved file is set up when the project is created in tutorial/pipepnes.py.

Advertisements