How boaz-maroko/bet_scrapper works
bet_scrapper is a Telegram bot that polls Bangbet for same-day football matches and odds, tracks changes, and reports them to chats. The sampled source shows match and Over/Under retrieval, odds-change formatting, monitoring, Telegram command registration, and a FastAPI webhook. Some handler and initialization details are in omitted excerpts, so their internal wiring is not expanded.
Main entry points: main.py Monitoring loop
Components 13
Webhook service
- FastAPI app
main.py - Update webhook
main.py - Health endpoint
main.py
Telegram bot
- Bot application
main.py - Start / stop handlers
main.py
Odds monitoring
- Monitoring loop
main.py - Match fetcher
main.py - Over/Under fetcher
main.py - Change formatter
main.py - Tracked matches
main.py
Other components
- Telegram user
- Telegram API
- Bangbet API
Connections 14
- Telegram user → Telegram API: sends updates
- Telegram API → Update webhook: posts updates
- Update webhook → FastAPI app: handled by
- Update webhook → Bot application: processes update
- Bot application → Start / stop handlers: dispatches commands
- FastAPI app → Health endpoint: serves status
- Start / stop handlers → Monitoring loop: controls monitoring
- Monitoring loop → Match fetcher: fetches matches
- Monitoring loop → Over/Under fetcher: fetches odds
- Match fetcher → Bangbet API: requests matches
- Over/Under fetcher → Bangbet API: requests odds
- Monitoring loop → Change formatter: formats changes
- Monitoring loop → Tracked matches: reads and updates
- Monitoring loop → Telegram API: sends reports