← All projects

Python Product Price Scraper

March 2026 BusinessPython Project files ↗

Overview

This program automatically checks prices on your favorite product pages and monitors them for changes. When it detects a price change, it sends a notification through a Discord webhook. It also logs the price and time of each check, so you can reconstruct the price history of a listing over time.

Discord price change notification

How to Use It

After downloading the program, you should see the following files. If product_pages.txt, proxies.txt, or historical_data.json are missing, run the program once to create them automatically, or add them manually.

Program files
Configuring the Discord webhook

To start the program, run main.py. It will retrieve the price for every URL listed in product_pages.txt. To check that everything worked, open historical_data.json, which should look something like this:

Example historical_data.json

To get the most out of it, run the program automatically each day using Task Scheduler on Windows or cron on Linux and macOS. On days when prices deviate from previously recorded values, you'll automatically get a notification.

How It Works

The application is divided into four main components:

  1. main.py coordinates the overall workflow. It loads configuration files and historical data, retrieves product pages, processes the scraped product information, updates the price history, and checks for price changes. If a change is detected, it generates and sends a Discord notification.
  2. retrieve_pages.py downloads product pages. It uses asynchronous HTTP requests via asyncio and aiohttp to retrieve many pages concurrently, and handles proxy rotation, request retries, and per-domain concurrency limits.
  3. product_scrapers.py extracts product information from the downloaded pages. Since each retailer uses a different HTML structure, there's a separate scraper function for each supported site that locates the product name and current price.
  4. helper_funcs.py contains shared helpers for formatting prices, extracting domain names from URLs, loading files safely, determining the working directory, and sending Discord webhook notifications. Centralizing these improves maintainability.

Features

Future Improvements