#car-alerts #belgium #telegram-bot #web-scraping #fastapi
#2ememain #autoscout24 #2dehands #deal-finder
Scrapes 2ememain.be, 2dehands.be and AutoScout24.be in parallel, scores deals mathematically (0β100), and pushes instant Telegram notifications the moment a matching listing goes online.
| Capability | Detail |
|---|---|
| Multi-source scraping | 2ememain, 2dehands & AutoScout24 β parallel, with retry logic |
| Deal scoring | Each car scored 0β100 based on price, mileage, year |
| Telegram alerts | Instant push notifications for new matching listings |
| Radius search | Search within X km of any Belgian city |
| Filters | Make, budget, mileage, year, fuel type, gearbox, region |
| Web dashboard | Clean UI to browse and sort results |
| One-click deploy | Railway-ready with Procfile + PostgreSQL |
| Layer | Technology |
|---|---|
| Backend | FastAPI + SQLAlchemy (SQLite / PostgreSQL) |
| Frontend | React 18 (CDN, no build step) + Tailwind CSS |
| Bot | python-telegram-bot with job queue scheduler |
| Scraping | requests + BeautifulSoup4 + Adevinta JSON API |
| Deal scoring | Custom mathematical model (price/mileage/year) |
git clone https://github.com/ForgedEmir/CarWatch.git
cd CarWatch
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your TELEGRAM_TOKEN and ALLOWED_USER_IDGet your Telegram credentials:
TELEGRAM_TOKENβ @BotFather, send/newbotALLOWED_USER_IDβ @userinfobot
# Terminal 1 β web interface
uvicorn app:app --reload
# Terminal 2 β Telegram bot + scheduler
python bot.py- Push to GitHub β go to railway.app
- New Project β Deploy from GitHub repo
- Add PostgreSQL plugin (Railway sets
DATABASE_URLautomatically) - Set env vars:
TELEGRAM_TOKEN,ALLOWED_USER_ID - Railway reads the
Procfileand starts web server + bot
| Command | Description |
|---|---|
/start |
Start the bot and activate alerts |
/status |
Show current search configuration |
/marque BMW |
Set car make |
/prix 2000 8000 |
Set price range (β¬) |
/km 150000 |
Set max mileage |
/annee 2015 |
Set minimum year |
/region Liège |
Set search region |
/carburant diesel |
Set fuel type |
/boite automatique |
Set gearbox type |
/intervalle 1 |
Check every N hours (default: 2) |
/search |
Trigger an immediate search |
βββ app.py FastAPI server + web UI
βββ bot.py Telegram bot + alert scheduler
βββ scraper.py Parallel scraper (3 sources)
βββ ai_analyzer.py Mathematical deal scoring (0β100)
βββ worker.py Background thread + database save
βββ database.py SQLAlchemy setup
βββ models.py Listing model
βββ media_service.py Async image download + WebP optimization
βββ data_pipeline.py Data normalization helpers
βββ static/ React frontend (CDN, no build)
βββ Procfile Railway process config
βββ requirements.txt Python dependencies
| Resource | Description |
|---|---|
| CONTRIBUTING.md | Setup, workflow, PR process |
| CODE_OF_CONDUCT.md | Community standards |
| SECURITY.md | Vulnerability reporting |
| LICENSE | MIT β free to use, modify, distribute |
CarWatch β Never miss the right car again.
