O'Reilly logo

Python Social Media Analytics by Michal Krystyanczuk, Siddhartha Chatterjee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a scraper with Selenium

First of all, we have to decide what kind of data we are going to scrape. In our case, the most interesting information are keyword-based search results which return a list of pins with their titles, descriptions, and usernames. We will try to see the users which are closest to each other in terms of similar interests. In order to start building the scraper we have to analyze the search results first.

We can see that the endpoint for the search is: https://www.pinterest.com/search/pins/. It already contains the search query under the q parameter.

Then, we can use Google Chrome or Mozilla Firefox inspector to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required