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
Release history Release notifications | RSS feed
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.10.tar.gz
(17.9 kB
view details)
Built Distribution
File details
Details for the file fusion_stat-0.0.10.tar.gz
.
File metadata
- Download URL: fusion_stat-0.0.10.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc345ee1d32ea9c540b566d8a3e40fb930995f5a21776c2a095a2941c74e1d76 |
|
MD5 | 4cea77da7d7f0896b7cc5aae6430380e |
|
BLAKE2b-256 | 5fef46896f9364b38a0094996d27088190a6824fb3fdf9c5801eeba93bede07b |
File details
Details for the file fusion_stat-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: fusion_stat-0.0.10-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63ae1206c349ab722ee543e0881ac89d777960084a23b1b1d772c5378af226bb |
|
MD5 | 29282faeb4375415f55be7ce65109c24 |
|
BLAKE2b-256 | 7e145d9bb26aab3ad35263fa623cb83ced8b08779ed94f0b1a9777533bb013e4 |