Skip to content

vaibhavg079/python-product-price-tracker

Repository files navigation

Price Tracker - Amazon & Flipkart

A Python application that tracks product prices from Amazon and Flipkart. When the price drops to your set limit or below, it automatically sends you an email notification.

Features

Multi-Platform Support: Track products from Amazon and Flipkart ✅ Price Alerts: Automatic email notifications when price drops below your limit ✅ GUI Interface: User-friendly tkinter interface ✅ Automatic Checking: Checks prices every 30 minutes ✅ Price History: Keeps track of price changes over time ✅ Easy Management: Add, delete, and manage multiple products

Requirements

  • Python 3.7+
  • pip (Python package manager)

Installation

Step 1: Install Python Dependencies

Open Command Prompt or PowerShell in the project directory and run:

pip install -r requirements.txt

Step 2: Done! 🎉

The app comes pre-configured with email settings. No manual setup needed!

Just enter your email address to receive alerts and start tracking prices.


Usage

Running the Application

  1. Open Command Prompt in the project directory
  2. Run the application:
python main.py

Or simply double-click run.bat

Using the Application

First Time Setup (Takes 30 seconds)

  1. Enter Your Email: The email address where you want to receive price alerts
  2. Click "Save": Your email is saved
  3. Click "Test Email" (optional): Verify everything works
  4. Done! ✅ Ready to start tracking

Adding Products to Track

  1. Product URL: Paste the full Amazon or Flipkart product link

    • Example: https://www.amazon.in/dp/B0XXXXXXXXX
    • Example: https://www.flipkart.com/p/XXXXXXXXX
  2. Price Limit: Enter the price (in ₹) at which you want to be notified

    • Example: If a laptop costs ₹50,000 and you enter 45,000, you'll get an alert when it drops to ₹45,000 or below
  3. Click "Add Product": The product will be added to the tracking list

Tracking Products

  • Start Tracking: Click to begin automatic price checking every 30 minutes
  • Stop Tracking: Stop the automatic checking
  • Refresh Now: Manually check prices immediately
  • Delete Selected: Remove a product from tracking

Activity Log

The log at the bottom shows:

  • When products are added/deleted
  • When prices are updated
  • When emails are sent
  • Any errors that occur

Database

The application uses SQLite for data storage:

  • tracked_products.db - Contains all product data and price history
  • Automatically created in the project directory on first run

How It Works

  1. Price Checking: Scrapes the product page to get current price
  2. Comparison: Compares with your set price limit
  3. Alert Logic:
    • If price ≤ limit → sends email (once per product)
    • If price > limit later → resets, ready to alert again if price drops
  4. Scheduling: Checks every 30 minutes automatically

Troubleshooting

Email Not Sending?

  1. Check your App Password: Make sure you're using the 16-character App Password, not your Gmail password
  2. Verify 2-FA is enabled: Gmail requires 2-Step Verification
  3. Click "Test Email": This will show you exactly what the error is
  4. Check internet connection: Ensure you have a stable connection

Price Not Updating?

  1. The URL might be incorrect or product might be unavailable
  2. Sometimes websites block automated scraping - try a manual refresh
  3. URL format must be correct - copy directly from the browser address bar

Application Won't Start?

  1. Make sure Python 3.7+ is installed
  2. Install requirements: pip install -r requirements.txt
  3. Check if port is available
  4. Run as Administrator if permission denied

Important Notes

⚠️ Email Settings:

  • Email credentials are pre-configured in the app
  • You only need to enter your recipient email to receive alerts
  • Email is sent automatically when prices match your limits

⚠️ Tracking Interval:

  • Default is 30 minutes
  • Don't set too frequently to avoid blocking by websites
  • 30 minutes is a good balance

⚠️ Website Changes:

  • If Amazon or Flipkart changes their website structure, the price scraping might not work
  • If this happens, try again later or restart the app

File Structure

Price Tracker/
├── main.py                 # Entry point
├── gui.py                  # GUI interface
├── database.py             # Database management
├── scraper.py              # Price scraping
├── email_notifier.py       # Email sending
├── requirements.txt        # Dependencies
├── README.md               # This file
└── tracked_products.db     # Database (created on first run)

Future Enhancements

  • Support for more e-commerce platforms
  • Price trend graphs
  • Configurable check intervals
  • Telegram/WhatsApp notifications
  • Browser extension for quick adds

License

Free to use and modify for personal use.

Support

If you encounter any issues:

  1. Check the Activity Log in the GUI
  2. Verify email configuration with "Test Email"
  3. Ensure product URLs are correct
  4. Check internet connection

Happy Shopping! Save money by tracking prices smartly! 🛍️

About

Python desktop application for tracking Amazon and Flipkart product prices with automated email alerts and GUI interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors