Scrapy Web Data Extraction

Asked

Viewed 414 times

0

Up.. Next guys... I’m writing code with scrapy framework to search and extract some data. I’m new at this! The code to follow theoretically would have to search and extract, but it does not extract the data when I run. I’m using the item class that exists inside the items file. The issue is that the code does not error in execution, cmd appears the information of the requests made and tals, but does not download the data nor save. If anyone can help me and give me a light I’ll be grateful.

Spider para buscar e extrair dados

  • Do not post your code in image. Copy and paste in question.

1 answer

0

Hi, try turning the command:

scrapy crawl pensador -o pensador.json

It will save the data in a JSON.

But the most correct way to do it is to treat the data crawled in pipelines.py

There you can save in the database. Take a look at the documentation: https://doc.scrapy.org/en/latest/topics/item-pipeline.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.