Web scraping and data-structuring project that extracts product information from e-commerce pages and turns it into an analysis-ready dataset.
This project builds a Python-based data collection pipeline that scrapes product listings (starting with Amazon) and structures the extracted fields — price, ratings, reviews, availability, brand — into a clean, tabular dataset ready for downstream analysis.
- Extract product-level data directly from live web pages rather than relying on an existing dataset
- Handle real-world HTML inconsistencies (missing fields, inconsistent formatting, pagination)
- Convert unstructured page content into a structured dataset that can be analyzed like any other tabular data source
| Tool | Purpose |
|---|---|
| Python | Core scripting language |
| Requests | Sending HTTP requests and handling page responses |
| BeautifulSoup | Parsing HTML and locating target elements |
| Pandas | Structuring scraped data into DataFrames and exporting to CSV |
| Regular Expressions (re) | Cleaning inconsistent text — prices, ratings, currency symbols |
Python Web Scraping.ipynb— Core scraping workflow: sends requests to product pages, parses HTML with BeautifulSoup, and extracts product name, price, rating, and availability.amazon web scaraping.ipynb— Amazon-specific scraping pass, extracting product identifiers, brand, and review counts from Amazon listing pages.Amazon multi.ipynb— Extends the scraping workflow across multiple product pages/categories in a single run, looping through a list of URLs and consolidating results into one dataset.
Note:
Data Cleaning.ipynbandExploratory_Data_Analysis.ipynbin this repo are general practice notebooks and aren't part of the scraping workflow above.
- Request handling — Sent structured GET requests to target product pages, with error handling for failed or blocked requests.
- HTML parsing — Used BeautifulSoup to locate and extract specific tags/classes containing product name, price, rating, and review count.
- Text cleaning — Applied regular expressions to strip currency symbols, normalize rating formats (e.g., "4.5 out of 5 stars" →
4.5), and handle missing fields gracefully. - Multi-page scraping — Looped the extraction logic across multiple product URLs/categories to build a larger combined dataset.
- Structuring & export — Loaded all extracted records into a Pandas DataFrame and exported to CSV for further analysis.
- Practical web scraping on real (not sandboxed) HTML structure
- Data cleaning at the point of collection, not after the fact
- Writing reusable scraping logic that works across multiple pages/categories
- Turning unstructured web content into a structured, analysis-ready dataset
- Clone this repo
- Install dependencies:
pip install requests beautifulsoup4 pandas - Open the desired notebook in Jupyter and run all cells
- Scraped output is saved as a CSV in the working directory