Skip to main content

Scrape football data from multiple sources simultaneously.

Project description

fusion-stat

A football data scraper that can scrape data from multiple sources simultaneously.

Installation

pip install fusion-stat

Usage

from fusion_stat import App

You can use it like this

async with App() as app:
    competitions = await app.get_competitions()

or

app = App()
competitions = await app.get_competitions()
await app.close()
params = competitions.get_params()
pl_params = next(params)
pl_params
{'fotmob_id': '47',
 'fbref_id': '9',
 'fbref_path_name': 'Premier-League',
 'official_name': 'Premier League',
 'transfermarkt_id': 'GB1',
 'transfermarkt_path_name': 'premier-league'}

The client uses httpx.AsyncClient, you can also customize parameters.

import httpx

client = httpx.AsyncClient()
async with App(client=client) as app:
    competition = await app.get_competition(**pl_params)
competition.info
{'id': '47',
 'name': 'Premier League',
 'logo': 'https://www.premierleague.com/resources/rebrand/v7.129.2/i/elements/pl-main-logo.png',
 'type': 'league',
 'season': '2023/2024',
 'country_code': 'ENG',
 'names': {'Premier League'},
 'market_values': '€11.09bn',
 'player_average_market_value': '€20.85m'}
competition.teams[1]
{'id': '8650',
 'name': 'Liverpool',
 'names': {'Liverpool'},
 'played': 28,
 'wins': 19,
 'draws': 7,
 'losses': 2,
 'goals_for': 65,
 'goals_against': 26,
 'points': 64,
 'country_code': 'ENG',
 'market_values': '€921.40m',
 'logo': 'https://resources.premierleague.com/premierleague/badges/rb/t14.svg',
 'shooting': {'shots': 534, 'xg': 62.6}}

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

fusion_stat-0.0.8.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

fusion_stat-0.0.8-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file fusion_stat-0.0.8.tar.gz.

File metadata

  • Download URL: fusion_stat-0.0.8.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1016-azure

File hashes

Hashes for fusion_stat-0.0.8.tar.gz
Algorithm Hash digest
SHA256 d0114024b1dc2dcd6ce1cb303d85d90948e12e3a7f42a77b1ca2a69ba59cd0c9
MD5 da0a465b3f87722b9de28edf6780d945
BLAKE2b-256 4751542149835b27dcc8031caa83f53f7ae07fd546540efc9cdae0a6245855f0

See more details on using hashes here.

File details

Details for the file fusion_stat-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: fusion_stat-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1016-azure

File hashes

Hashes for fusion_stat-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bd9160f3d7d98de4c9bf2421fe395cebe4ed216d2a201e8c9070a4888d1f40d0
MD5 2dfba8ff9938cc6a0390cac709603cce
BLAKE2b-256 ed5507f6b1c6f2462bdfda9ed13b88d62503d0bee19196c515f09773a1e5e692

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page