Skip to content

The Amazon Price Monitor is a Python program for tracking and alerting users about price changes on Amazon. It scrapes real-time data from specified product pages, storing details in a CSV file. With email notifications, users are promptly informed when product prices drop below set thresholds, ensuring timely and informed purchasing decisions.

Notifications You must be signed in to change notification settings

NadiaAzri/Amazon_Price_Monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Price Monitoring

Scrap the product data and alert if the price is the tracking one

Language used is Python 3.8. / Pycharm.

This Python program is designed to scrape product information from the Amazon website and monitor the price of a specific product. If the current price falls below a predefined threshold, the program sends an email notification to alert the user.

Features

  • Web Scraping: Utilizes the requests library to fetch the HTML content of the Amazon product page and BeautifulSoup for parsing.

  • Data Storage: Stores the product information, including date, product code, title, tracking price, current price, and URL, in a CSV file (PriceHistory.csv).

  • Email Notification: Sends an email alert if the current price is below the specified tracking price. Uses the smtplib library for SMTP communication.

  • Continuous Monitoring: The program runs in an infinite loop, periodically checking the product price. The loop is paused for a random time interval between 10 to 20 seconds after each iteration.

Setup

  1. Install the required libraries:

    pip install requests beautifulsoup4 pandas
  2. Update the following variables in the script:

    • url: The URL of the Amazon product page.
    • save_data_file: The path to the CSV file for storing price history.
    • code: Product code.
    • Tracking_Price: The desired price threshold for triggering an email alert.
    • gmail_user: Your Gmail email address.
    • gmail_password: Your Gmail account password.
    • to: Email addresses to receive notifications.
  3. Run the script:

    python your_script_name.py

Notes

  • Make sure to keep your Gmail credentials secure and consider using an application-specific password for enhanced security.
  • Adjust the monitoring frequency and other parameters according to your preferences.

Feel free to customize the script further based on your needs and preferences. Happy monitoring!

About

The Amazon Price Monitor is a Python program for tracking and alerting users about price changes on Amazon. It scrapes real-time data from specified product pages, storing details in a CSV file. With email notifications, users are promptly informed when product prices drop below set thresholds, ensuring timely and informed purchasing decisions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages