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)