
The CSS attributes, “class” and “itemprop”, for author element, is “author”.The dot operator ‘.’ in the start, indicates extracting data, from a single quote. The extract_first() method, will give the first matching value, with the CSS attribute “text”. Hence, the XPath expression, for the same, would be – The text() method, will extract the text, of the Quote title. The CSS ‘class’ attribute, for Quote Title, is “text”.Hence, we will write XPath expressions for extracting them, in a loop.


We need to fetch the Quote Title, Author, and Tags of all the Quotes. The Quotes on further pages of the website belong to the same CSS class attribute Similarly, all the other quotes on the webpage have the same CSS ‘class’ attribute. When we right-click on the first Quote and choose Inspect, we can see it has the CSS ‘class’ attribute “quote”.This will allow us to view its CSS attributes. For writing the XPath expressions, we will select the element on the webpage, say Right-Click, and choose the Inspect option.The data extraction code, using Selectors, will be written here. This is the default callback method, present in the spider class, responsible for processing the response received.
#WEBSCRAPER NOT SELECTING LINKS CODE#
#WEBSCRAPER NOT SELECTING LINKS HOW TO#

