In todayβs online shopping world, prices for the same product can vary across platforms like Amazon, Flipkart, Snapdeal, and Croma. To help users find the best deal, I built a real-time product price comparison tool using Python and web scraping.
π‘ Project Overview
The goal of my project was simple:
Allow users to enter a product name β fetch live prices from multiple e-commerce websites β display results in a clean web page.
π οΈ Tech Stack Used
Python (main logic)
Selenium (for dynamic page scraping)
BeautifulSoup (for parsing HTML)
HTML/CSS (for front-end)
Flask (optional, for running web locally)
π How It Works
User enters a product name in the HTML form.
The Python backend uses separate scripts to scrape:
Amazon
Flipkart
Snapdeal
Croma
It fetches:
Product Name
Price
Product URL
(Optional) Image
The data is shown on results.html page.
Clicking the URL takes user directly to the product listing.
π§ Key Challenges Faced
Handling different HTML structures on each site.
Dynamic content loading via JavaScript (solved using Selenium).
Avoiding scraping blocks (using user-agent tricks and time delays).
Optimizing performance by letting users choose which websites to scrape.
π― Features
β
Real-time scraping (no CSV files)
β
Website selection filter (e.g., Amazon only, or Amazon + Flipkart)
β
Simple UI (HTML + CSS)
β
Results with name, price, and clickable product links
πΈ Sample Output
A user searches βRedmi Note 13β β sees prices from 3 sites side-by-side β clicks the cheapest β buys it!
π§© What's Next?
Add more websites (e.g., Ajio, TataCliq)
Add product images to improve UI
Host the project on cloud (Render or Railway)
π Codebase
Iβve structured the project into:
index.html β front end form
scrape_amazon.py, scrape_flipkart.py, etc. β individual scrapers
results.html β to display results
main.py β master controller for logic (optional Flask app)
π Final Thoughts
This project helped me learn:
Real-world Python scraping
Managing HTML forms and back-end integration
Handling edge cases and data inconsistencies
Itβs a great example of applying Python to solve practical e-commerce problems.
Iβm proud of how it turned out, and I look forward to improving it further!
π Full Project Code: View on GitHub
π¬ Have questions or want to try it out? DM me or leave a comment
β Ayesha Shaikh
Top comments (0)