Scrapy Define an Item - Scrapy

How to define an item using Scrapy?


Items are the containers which are used for collecting the data that is scrapped from the websites. You should start your spider by defining your Item. To define items, edit file found under directory first_scrapy (custom directory). looks like as shown below

MyItem class will inherit from Item which consists of a number of pre-defined objects that Scrapy has already built for us. For example, if you want to extract the name, URL and description from the sites, you should define the fields for each of these three attributes.

Therefore, let's add those items that we want to collect

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Scrapy Topics