Skip to main content

Scraper for FotMob matches

Project description

FMScraper

FMScraper is a web scraping tool that combines Selenium for dynamic content and requests for HTTP handling. This repository enables efficient extraction of data from FotMob.

Inspired by: Webscraper-PremData and scraping-football-sites

Overview

FMScraper is a web scraping tool designed to extract comprehensive football match statistics and data from FotMob, a popular platform for football statistics, live scores, and match analysis. The tool automates the data collection process, handling JavaScript-driven content and dynamic page layouts that traditional scraping methods cannot access.

Features

  • Scrapes match info from FotMob
  • Handles JavaScript-driven layouts using Selenium
  • Extracts data for specific leagues, seasons, and matchweeks
  • Provides easily exportable or processable match data for further analysis.

Requirements

Disclaimer

For educational and research purposes only. Do not use it commercially.

Installation

  1. Clone the repository:
git clone https://github.com/MieszkoPugowski/FMScraper.git
cd FMScraper
  1. Install using pip:
pip install fmscraper

Example usage

from fmscraper import MatchStats, MatchLinks
game_ids = MatchLinks(league_id=38,league="bundesliga",season='2024-2025').get_matches_ids(32)

some_game = game_ids[0]

data = MatchStats(some_game)

# List of all shots in a game
shotlist = data['content']['shotmap']['shots']
print(shotlist)

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

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

fmscraper-0.1.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fmscraper-0.1.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file fmscraper-0.1.2.tar.gz.

File metadata

  • Download URL: fmscraper-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for fmscraper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2bcf06d0b95f993e240decedf43e4f47e22dc759d068d17e1ed26eff81789cec
MD5 b28f044f6d088e2b1e6724a23c13045f
BLAKE2b-256 8a073b8613bce336b40bef718b76046e4cb8eaee897a409e376b157e8de1d841

See more details on using hashes here.

File details

Details for the file fmscraper-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fmscraper-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for fmscraper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb8468483dada269ba6ad1e9f4e1d59ade9d781ae014d6d60e8b660d6ea1d0a4
MD5 65ae6e5c1cfdd1aaffa2e8c39ef1ed97
BLAKE2b-256 d5845ca1bb7ad3b84c71d1dd41d7745daee8d7a754f267af101b7b1629ccacd5

See more details on using hashes here.

Supported by

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