mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[PR #480] [MERGED] Add support for scraping Understat #596
Labels
No labels
ESPN
FBref
FotMob
MatchHistory
SoFIFA
Sofascore
WhoScored
WhoScored
bug
build
common
dependencies
discussion
documentation
duplicate
enhancement
good first issue
invalid
performance
pull-request
question
question
removal
understat
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/soccerdata#596
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/probberechts/soccerdata/pull/480
Author: @JanVanHaaren
Created: 2/11/2024
Status: ✅ Merged
Merged: 2/12/2024
Merged by: @probberechts
Base:
master← Head:feature/add-understat-support📝 Commits (7)
6e75a3dAdd support to extract Understat's JS variables to BaseRequestsReaderc75262bAdd support to scrape advanced statistics from Understat1478ee8Add tests for new functionalityef33eecAdd documentation for Understat scraper6dc3aa8Update dependency pip to v2458e8574Update dependency sphinx-autobuild to v20241d90bf0fix: Add 'player' to read_player_season_stats index📊 Changes
17 files changed (+2795 additions, -29 deletions)
View changed files
📝
.github/workflows/constraints.txt(+1 -1)📝
README.rst(+4 -3)📝
docs/conf.py(+1 -0)➕
docs/datasources/Understat.ipynb(+1926 -0)📝
docs/datasources/index.rst(+14 -0)📝
docs/index.rst(+2 -2)📝
docs/reference/index.rst(+1 -0)➕
docs/reference/understat.rst(+10 -0)📝
poetry.lock(+9 -8)📝
pyproject.toml(+1 -1)📝
soccerdata/__init__.py(+6 -4)📝
soccerdata/_common.py(+26 -10)📝
soccerdata/_config.py(+5 -0)➕
soccerdata/understat.py(+707 -0)📝
tests/conftest.py(+12 -0)➕
tests/test_Understat.py(+60 -0)📝
tests/test_common.py(+10 -0)📄 Description
This pull request adds support to scrape advanced statistics such as xG, xGBuildup and xGChain, and shot events with their associated xG values from the Understat website.
Concretely, this pull request includes the following changes.
BaseRequestsReaderclass with functionality to extract JavaScript variables from the Understat website.Understatclass with functionality to scrape leagues, seasons, schedules, team-match statistics, player-match statistics, player-season statistics and shot events.Understatclass.This pull request closes #151.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.