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.9.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

fusion_stat-0.0.9-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fusion_stat-0.0.9.tar.gz
  • Upload date:
  • Size: 17.9 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.9.tar.gz
Algorithm Hash digest
SHA256 bf4890fef6c63815812e2836c97941b8687954306e575a5f8e8defb671676044
MD5 4889aa68c4d48e7fcbc83329f60bed8e
BLAKE2b-256 c79d915bf78391a4508dfe5f431d5705d566ebbdb8b9b2de8e007b22db7d5a05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fusion_stat-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 32.2 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9380ad27c823d478a4bd5e9ce832f8b72da75459277d17aea138ca01d2315299
MD5 d1087c9f5580ca028cb7d4844fbfb18d
BLAKE2b-256 39586aa17b5b43fb8f84fc1cbf7983c3d34c15e27e9e91e9aba22feb9e53a69d

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