Skip to content

siriiuss/TFF-Leagues-Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFF Leagues Scraper

An asynchronous REST API to scrape real-time standings and fixtures from the official Turkish Football Federation (TFF) website.

⚠️ Legal Disclaimer & Data Usage Terms

  1. Intellectual Property: All data retrieved through this tool is the exclusive property of the Turkish Football Federation (TFF). This software does not grant any rights, titles, or licenses over the retrieved data.
  2. Terms of Service: Users are strictly required to comply with the TFF Terms of Use. The commercial use, redistribution, or permanent storage of TFF data without explicit written permission from the federation is strictly prohibited.
  3. Priority of Terms: While this software is licensed under GPLv3, this license applies ONLY to the source code of the scraper. TFF’s data usage policies and legal terms take absolute precedence over any permissions granted by the GPLv3 regarding the data itself.
  4. Limitation of Liability: The contributors of this repository shall not be held responsible for any misuse of this tool or any legal consequences arising from the violation of TFF's terms. Users are solely responsible for their own actions and the legality of how they utilize the retrieved data.

Tech Stack

  • Framework: FastAPI
  • Scraping: BeautifulSoup4 & HTTPX
  • Caching: FastAPI-Cache (In-memory)
  • Testing: Pytest & Respx

Installation

  1. Clone the repository:

    git clone git clone https://github.com/siriiuss/tff-leagues-scraper.git
    cd tff-leagues-api
  2. Create a virtual environment and install dependencies:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt

Usage

Docs: https://siriiuss.github.io/TFF-Leagues-Scraper/

Start the server:

uvicorn app.main:app --reload

API Endpoints

  • GET /: Health check
  • GET /api/standings/{league_name}: Get standings for simple leagues
  • GET /api/multi-standings/{league_name}/{group_index}: Get standings for multi-group leagues
  • GET /api/fixture/{league_name}: Get fixture/match results

Documentation is available at http://localhost:8000/docs.

Testing

Run the test suite:

pytest tests/ -v

License

GPLv3

About

Türkiye Futbol Federasyonu Skor Tablosu Scraper

Topics

Resources

License

Stars

13 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages