mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-26 02:25:51 +03:00
[GH-ISSUE #904] [Understat] Team's stat unable to be read #196
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#196
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?
Originally created by @maris-volk on GitHub (Dec 9, 2025).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/904
Describe the bug
Unable to scrape the schedule from Understat. Either the data doesn't arrive at all, or there's a KeyError - 'statData'.
Affected scrapers
This affects the following scrapers:
Code example
Error message
or
Additional context
Literally less than a day ago everything was working.
Contributor Action Plan
@pres-2 commented on GitHub (Dec 9, 2025):
Same issue on my side. The cached data saved as json are empty.
@rontrim commented on GitHub (Dec 10, 2025):
I'm running into the same issue. Did some digging and it looks like Understat isn't putting statData or datesData in the HTML anymore - it's all being loaded via JavaScript after the page loads.
Both return 200 OK with valid HTML, but the JS variables the library is looking for just aren't there anymore. Only basic stuff like THEME and BASE_URL show up.
Seems like Understat changed their site to load data via AJAX instead of embedding it in the HTML, which breaks how the scraper currently works.
Versions:
@maris-volk commented on GitHub (Dec 10, 2025):
Okay, so what can you recommend to get information on matches, XG, XGa, corners and yellow cards?
@rontrim commented on GitHub (Dec 10, 2025):
I use the fbref scraper functions provided to get that data. I also have other data in my pipeline coming from understat so this is still an issue for me that I don't know how to resolve.