Starting with Scrapy

First, we need to define what we want to accomplish. In this case, we want to create a crawler that will extract all the book titles from https://www.packtpub.com/. In order to do so, we need to analyze our target. If we go to the https://www.packtpub.com/ website and right-click on a book title and select Inspect, we will see the source code of that element. We can see, in this case, that the book title has this format:

Creating a crawler for extracting all the book titles

Here, we can see div with a class of book-block-title, and then the title name. Keep this in mind or in a notebook, as that would be even better. We ...

Get Learning Python Web Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.