Real-time stock & price monitoring for Flipkart and Amazon β with Telegram alerts and a live web dashboard.
Live Web App: satiricalguru.github.io/ShopBot
| Feature | Description |
|---|---|
| Multi-platform | Supports Flipkart and Amazon product URLs |
| Instant Check | Paste any URL and get stock status in seconds |
| Price Extraction | Automatically extracts the current selling price |
| Watchlist | Add products to monitor continuously in the background |
| Real-time Updates | WebSocket-powered live status β no refresh needed |
| Check History | Log of all checks with timestamps and prices |
| Telegram Alerts | Get notified the moment a product comes back in stock |
| Pincode Delivery | Check Flipkart deliverability for a specific pincode |
| Modern UI | Dark luxury-tech design, fully responsive |
git clone https://github.com/satiricalguru/ShopBot.git
cd ShopBot
chmod +x start.sh
./start.shThen open http://localhost:8000 in your browser.
ShopBot/
βββ backend/
β βββ app.py # FastAPI server (REST + WebSocket)
β βββ monitor.py # Platform router (Flipkart + Amazon)
β βββ amazon_monitor.py # Amazon scraper
β βββ notifier.py # Telegram notification handler
β βββ requirements.txt
βββ frontend/
β βββ index.html # Single-page web app (no build step)
βββ .env.example # Environment variable template
βββ .gitignore
βββ start.sh # One-command launcher
βββ README.md
No .env editing needed. Open the app at http://localhost:8000, click βοΈ Settings, and paste your credentials there. They are saved permanently to settings.json (gitignored) and survive server restarts.
| Field | Where to get it |
|---|---|
| Bot Token | Message @BotFather β /newbot β copy the token |
| Chat ID | Message your bot, then visit https://api.telegram.org/bot<TOKEN>/getUpdates |
Telegram is optional. The app works without it β you just won't receive push notifications.
If you are using the live GitHub Pages app at satiricalguru.github.io/ShopBot or any static server, you will need to point the frontend to your running backend:
- Open the app and click the βοΈ Settings icon in the top header.
- Under Server Connection, set the Backend API URL to your deployed backend instance (e.g.
https://your-backend.onrender.comorhttp://localhost:8000if running the backend locally). - Click Save Settings. The app will reload and establish connection with your custom server automatically.
The only thing in .env is the default check interval:
CHECK_INTERVAL=30If you prefer not to use start.sh:
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r backend/requirements.txt
playwright install chromium
cp .env.example .env # Only needed to customise CHECK_INTERVAL
cd backend
uvicorn app:app --reload --port 8000Then open http://localhost:8000 and add your Telegram credentials via βοΈ Settings.
- Playwright (headless Chromium) navigates to the product page
- For Flipkart: checks for
"Add to Cart"/"Buy Now"buttons (in-stock) and"Notify Me"/"Sold Out"text (out-of-stock). Optionally checks pincode-level deliverability. - For Amazon: reads the
#availabilityspan and checks for#add-to-cart-buttonvisibility - Results β including price, image, and platform β are returned over HTTP + WebSocket
- If the product is in stock and Telegram is configured, an alert is sent immediately with the platform name
- Amazon anti-bot: Amazon aggressively blocks headless browsers. Checks may occasionally fail with a CAPTCHA notice β this is expected. Reduce watchlist frequency or use it for one-off checks.
- Credentials: Telegram token and chat ID are entered via the Settings UI and saved to
settings.json(gitignored). They are never stored in.envor committed to git. - CORS:
allow_origins=["*"]is set for local development. Restrict this if you deploy the backend publicly. - Data persistence: watchlist and history are in-memory and reset on server restart. Settings (credentials + interval) persist across restarts via
settings.json.
- Persistent watchlist (SQLite / JSON)
- Meesho support
- Browser extension mode
- Price history chart
MIT β see LICENSE
Developed by Satirical Guru , Claude & Antigravity .