Skip to content

Pavel-Durov/games.scraper.bot

Repository files navigation

Arsenal FC Fixtures Scraper Bot

A Python Telegram bot that scrapes Arsenal FC fixtures from their official website and sends updates via Telegram.

Features

  • 🔍 Scrapes Arsenal FC fixtures from the official website
  • 📱 Sends formatted updates via Telegram
  • ⚽ Filters fixtures by venue (Emirates Stadium)
  • 📅 Highlights today's matches
  • 🔔 Interactive bot commands

Requirements

  • Python 3.11+
  • uv for fast dependency management

Note: This project uses only pyproject.toml with uv - no separate requirements.txt files needed!

Getting Started

Installation

  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone the repository and navigate to it:
cd games.scraper.bot.ts
  1. Create a virtual environment and install dependencies:
uv sync --all-extras

This will automatically create a virtual environment and install all dependencies from pyproject.toml.

Configuration

Set up the following environment variables (you can use a .envrc file or export them):

export ARSENAL_GAMES_TELEGRAM_BOT_TOKEN="your_bot_token_here"
export ARSENAL_GAMES_TELEGRAM_BOT_CHAT_ID="your_chat_id_here"

To get a bot token:

  1. Message @BotFather on Telegram
  2. Create a new bot with /newbot
  3. Copy the token provided

Usage

Run the scraper once

python src/main.py

Run the interactive bot

python -m src.bot

The bot supports the following commands:

  • /start - Triggers a fixtures scrape and sends results

Development

Run tests

pytest tests/ -v

Run tests with coverage

pytest tests/ --cov=src --cov-report=term-missing

Linting

# Check for issues
ruff check src tests

# Auto-fix issues
ruff check --fix src tests

Formatting

# Check formatting
ruff format --check src tests

# Format code
ruff format src tests

CI/CD

The project uses GitHub Actions for continuous integration:

  • Runs tests on Python 3.11 and 3.12
  • Checks code formatting with ruff
  • Runs linting checks
  • Generates coverage reports

About

Arsenal Stadium games scraper and telegram bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages