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.11.tar.gz
(18.0 kB
view details)
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 fusion_stat-0.0.11.tar.gz.
File metadata
- Download URL: fusion_stat-0.0.11.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f70f216f3b9470b8f2b9e8f598b9ad718884813108d43da29bdc86452a8b25
|
|
| MD5 |
14f7ac5f2011c506613926199fe70275
|
|
| BLAKE2b-256 |
1ab82d1e1d128d8ff6dbadf603ba3a526c1829ed61cb423f826d6bd459af45b1
|
File details
Details for the file fusion_stat-0.0.11-py3-none-any.whl.
File metadata
- Download URL: fusion_stat-0.0.11-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.0 Linux/6.5.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38d5d41433b80d40941b869c2008786ff354a79f1c5ecc24a72c7d024bab20f5
|
|
| MD5 |
c8d156e2b023fc701d8d26a30353a44d
|
|
| BLAKE2b-256 |
abf74d933c48ac279ca1490033958bea57f4e068275c269c668eb3a83eda365c
|