Football Stats Scraper - Footstats CLI
Project description
Footstats CLI
Football player stats, transfers, and market values — straight from your terminal.
Overview
Footstats is an open-source CLI tool that lets you search for any football player and retrieve their profile, transfer history, and match statistics — all from your terminal, powered by data from Transfermarkt.
Features
- Player Search — Search any player by name
- Player Profile — Market value, age, club, position, nationality, and more
- Transfer History — Full transfer history with fees and market values
- Match Stats — Per-game stats including goals, assists, cards, minutes, passes, and shots
- Interactive Menu — Navigate with a single keypress
- Direct Commands — Call any command directly with arguments
Data Sources
| Source | Data |
|---|---|
| Transfermarkt | Market value, transfers, match stats, player profile |
Requirements
Installation
With pip
pip install footstats-cli
With uv (recommended)
uv tool install footstats-cli
That's it — the footstats command is now available globally in your terminal.
Upgrade to latest version
uv tool upgrade footstats-cli
Uninstall
uv tool uninstall footstats-cli
Usage
Interactive menu
footstats
Direct commands
footstats player "Cristiano Ronaldo"
footstats transfer-history "Lionel Messi"
footstats stats "Erling Haaland"
Options
footstats --help
footstats --version
Configuration
By default the tool works out of the box. To customize request behavior, create a .env file in your working directory:
USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64)...
ACCEPT_LANGUAGE=en-US,en;q=0.5
ACCEPT_ENCODING=gzip, deflate
REQUEST_DELAY=3.0 # seconds between requests — increase if getting blocked
Project Structure
footstats-scraper/
├── src/
│ ├── cli/
│ │ ├── main.py # CLI entry point
│ │ └── utils/ # Display helpers
│ ├── models/ # Dataclasses
│ ├── providers/ # Scraping logic
│ └── utils/ # Config, parsing, requests
├── tests/
├── .env.example
├── pyproject.toml
└── README.md
Development
1. Clone the repository
git clone https://github.com/Marin2409/footstats-cli.git
cd footstats-cli
2. Install UV
# macOS
brew install uv
# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
3. Install dependencies
uv sync
4. Set up environment variables
cp .env.example .env
5. Run directly without installing
# With Python
python -m src.cli.main [command] [argument]
# With UV (Recommended)
uv run python -m src.cli.main [command] [argument]
| Segment | Description |
|---|---|
src |
Root source folder |
cli |
CLI parent folder |
main |
Entry point file |
command |
Action (e.g. player, stats) |
argument |
Player name (e.g. "Cristiano") |
Run Tests
pytest tests/test_providers.py
Disclaimer
This project is an independent open-source tool and is not affiliated with, endorsed by, or sponsored by Transfermarkt or any other data provider. Use it at your own risk and ensure compliance with their Terms of Service and avoid excessive requests. The REQUEST_DELAY setting in .env helps ensure responsible usage.
Users are solely responsible for ensuring that their use of this software complies with applicable laws, regulations, website terms of service, robots.txt policies, and rate-limiting requirements.
The authors provide this software for educational and research purposes only and make no representations regarding the legality or appropriateness of its use in any particular jurisdiction or against any particular website.
User Responsibility
By using this software, you acknowledge that you are responsible for determining whether your use complies with applicable laws, regulations, and the terms of service of any websites you access.
The authors are not responsible for how users choose to use this software.
Contributing
Contributions are welcome! Please open an issue before submitting a pull request so we can discuss the change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
License
MIT License — see LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file footstats_cli-0.1.4.tar.gz.
File metadata
- Download URL: footstats_cli-0.1.4.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
359e75ada084cd3c71f2d6315da1c31e622e6849caec41f96539dc8652fbe5f3
|
|
| MD5 |
f2afc1317474a823ecca1c668805152b
|
|
| BLAKE2b-256 |
05491f62657066d08ad50f46e3f1b8b438ca0633ecf823e50b7c45bc2d16d4a7
|
Provenance
The following attestation bundles were made for footstats_cli-0.1.4.tar.gz:
Publisher:
publish.yml on Marin2409/footstats-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
footstats_cli-0.1.4.tar.gz -
Subject digest:
359e75ada084cd3c71f2d6315da1c31e622e6849caec41f96539dc8652fbe5f3 - Sigstore transparency entry: 1758250636
- Sigstore integration time:
-
Permalink:
Marin2409/footstats-cli@a6f2565ab3e9ac1d834ebe3046ddf2b34f8755df -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Marin2409
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6f2565ab3e9ac1d834ebe3046ddf2b34f8755df -
Trigger Event:
push
-
Statement type:
File details
Details for the file footstats_cli-0.1.4-py3-none-any.whl.
File metadata
- Download URL: footstats_cli-0.1.4-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5ffecdad5fb378d46b362942fc89d06ae8cf90cb6c7cb5b68c14c786961a6e4
|
|
| MD5 |
746736d03745bc69571afb1982474cc6
|
|
| BLAKE2b-256 |
1131b7e12e38af0c13ef2cc152ea6c2004bc0f8f4f6b2a8d40cda98b0d2d9696
|
Provenance
The following attestation bundles were made for footstats_cli-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on Marin2409/footstats-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
footstats_cli-0.1.4-py3-none-any.whl -
Subject digest:
c5ffecdad5fb378d46b362942fc89d06ae8cf90cb6c7cb5b68c14c786961a6e4 - Sigstore transparency entry: 1758250675
- Sigstore integration time:
-
Permalink:
Marin2409/footstats-cli@a6f2565ab3e9ac1d834ebe3046ddf2b34f8755df -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Marin2409
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6f2565ab3e9ac1d834ebe3046ddf2b34f8755df -
Trigger Event:
push
-
Statement type: