A Telegram bot that provides detailed statistics and visualizations for football players using data from fbref.com.
- Scrapes player statistics from fbref.com
- Collects basic player info, match statistics, and advanced metrics
- Caches data locally to reduce load on source website
- Handles both field players and goalkeepers
- Interactive graphs showing player performance over seasons
- Multiple visualization types:
- Standard statistics (Goals/Assists, Cards)
- Passing statistics
- Shooting statistics
- Goalkeeper-specific statistics (for GKs)
- Advanced goalkeeper metrics (for GKs)
- Search players by name
- View basic player information
- Browse statistics by season
- Navigate through multiple graph types
- Paginated results for better UX
- pyTelegramBotAPI
- selenium
- matplotlib
- numpy
- unidecode
- python-dotenv
Configuration options available in config.ini:
- Items per page settings
- Browser pool configuration
- Headless mode toggle
- Admin settings
- Install requirements:
pip install -r reqs.txt- Configure environment variables:
- Create
.envfile with your Telegram Bot API key - Adjust
config.inias needed
- Run the bot:
python src/main.pysrc/data_analyzer/- Data visualization and analysisrepository/- Data storage and retrievalwebScraper/- Web scraping functionalitymain.py- Bot implementation
resources/- Static resources and cached dataconfig.ini- Configuration file
MIT License