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 Fusion

You can use it like this

async with Fusion() as fusion:
    competitions = await fusion.get_competitions()

or

fusion = Fusion()
competitions = await fusion.get_competitions()
await fusion.aclose()
params = competitions.get_params()
params
[{'fotmob_id': '47',
  'fbref_id': '9',
  'fbref_path_name': 'Premier-League',
  'official_name': 'Premier League'},
 {'fotmob_id': '87',
  'fbref_id': '12',
  'fbref_path_name': 'La-Liga',
  'official_name': 'La Liga'},
 {'fotmob_id': '54',
  'fbref_id': '20',
  'fbref_path_name': 'Bundesliga',
  'official_name': 'Bundesliga'},
 {'fotmob_id': '55',
  'fbref_id': '11',
  'fbref_path_name': 'Serie-A',
  'official_name': 'Serie A'},
 {'fotmob_id': '53',
  'fbref_id': '13',
  'fbref_path_name': 'Ligue-1',
  'official_name': 'Ligue 1'}]

You can also use it like this

import httpx

async with httpx.AsyncClient() as client:
    fusion = Fusion(client=client)
    competition = await fusion.get_competition(**params[0])
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',
 'names': {'Premier League'}}
competition.teams[1]
{'id': '10252',
 'name': 'Aston Villa',
 'names': {'Aston Villa'},
 'played': 20,
 'wins': 13,
 'draws': 3,
 'losses': 4,
 'goals_for': 43,
 'goals_against': 27,
 'points': 42,
 'logo': 'https://resources.premierleague.com/premierleague/badges/rb/t7.svg',
 'shooting': {'shots': 289, 'xg': 36.0}}

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

Uploaded Source

Built Distribution

fusion_stat-0.0.4-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fusion_stat-0.0.4.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1018-azure

File hashes

Hashes for fusion_stat-0.0.4.tar.gz
Algorithm Hash digest
SHA256 cc08af9dd4792f8fafa927c61841063025550c859b885590d895f9e183afa438
MD5 588db85f85950fb2646ef8f05ac2c27c
BLAKE2b-256 f678c28c19f7c6bf2447409bd57f3003f6ffddb471d055ffe481707404b859c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fusion_stat-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1018-azure

File hashes

Hashes for fusion_stat-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 49c1da2ca452d66bde7713ce42745841cee681ffeebb72cd507ed57d0afb93bb
MD5 190cdb4d7a66c44c4b72fbc1f2f6f4ea
BLAKE2b-256 c3a51dc25b31d074ee50638e05a00fcbb9f0286a31d796b6f55be1121b83ee8e

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