An application that reports available matches for an UrbanSoccer Supersub to a Telegram bot.
In France, there is a network of football fields called UrbanSoccer. This network has a web portal, where among other possibilities there is a feature of matching players without a team with teams in need of substitutes — it's called Supersub.
I felt the need to receive the reports about available matches easier and quicker compared to visiting the web portal, and that's how this application appeared.
- Built with Python
- Scrapes the UrbanSoccer web portal using Selenium and ChromeDriver
- Automatically gets latest ChromeDriver using webdriver-manager
- Integration with Telegram powered by python-telegram-bot
- Continuous Deployment implemented with GitHub Actions
- Deployed on Google Cloud Platform, on a free tier Compute Engine VM
- Wrapped in systemd service
- Provision a Virtual Machine
- Clone the repository onto the host:
sudo git clone https://github.com/F1orin/supersub_monitor.git /opt/supersub_monitor cd /opt/supersub_monitor - Create python's virtual environment:
python3 -m venv .venv source .venv/bin/activate - Install dependencies:
pip install --upgrade pip pip install -r requirements.txt - Populate the required environment variables:
cp src/.env.template src/.env nano src/.env- Set the city (e.g.
Nantes) - Provide UrbanSoccer credentials (Browser dev tools -> Application -> Local storage, look for
auth-tokenandauth-userid) - Configure Telegram bot - see here
- Set the city (e.g.
- Install and start the supersub systemd service.
sudo cp deploy/supersub.service /etc/systemd/system/supersub.service sudo systemctl daemon-reload sudo systemctl enable --now supersub
Tip: rebooting the GCE instance changes its public IP, so remember to update the SSH_HOST secret in GitHub Actions before the next deploy.
If you would like to contribute, please submit a pull request.
This project is licensed under the MIT License.
