Web scraping eBay with Python for Beginners

How to web scrape product titles and prices on eBay with Python

Julia Kho
5 min readJun 24, 2021
Source: Author

In this article, we will go through an easy example of how to scrape the product listing titles of crime books from the first page of eBay using Python. This is intended for beginners who are looking to practice web scraping, so everything is broken down into simple steps.

Note: If you are not familiar with HTML tags, refer to W3Schools Tutorials. It is important to understand the basics of HTML for our web scraping needs.

Exercise: Web scrape crime book titles from eBay

Step 1: Inspect the Website

We always will start off by examining the html code behind the website in order to locate the relevant pieces of code that has the information we are looking for. In this case, we want to find the product listing title in the html code.

Open up your web browser, go to ebay.com and search for “crime books”. Next, right click on the page and select “Inspect. This will allow us to see the raw code behind the site.

Once you’ve clicked on “Inspect”, you should see this console pop up (pictured below). This shows the html code on this page. Our goal is to find where the name…

--

--

Julia Kho
Julia Kho

Written by Julia Kho

Julia is an analytics professional who loves to write easy to understand Python and data science articles for beginners

Responses (1)