Extracting data

With Spider generated and the item declared with the fields required, we will now proceed to extract the values or data required for specific item fields. Extraction-related logic can be applied using XPath, CSS Selectors, and regular expressions and we also can implement Python-related libraries such as bs4 (Beautiful Soup), pyquery, and so on.

With proper start_urls and item (QuotesItem) being set up for the Spider to crawl, we can now proceed with the extraction logic using parse() and using selectors at https://docs.scrapy.org/en/latest/topics/selectors.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.45.62