mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-26 02:25:51 +03:00
[GH-ISSUE #124] [FBref] pulling back "out of date" statistics #25
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#25
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 @philbywalsh on GitHub (Dec 16, 2022).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/124
When using the API to scrape from FBRef I noticed something odd.
The APIs for each category of stats (e.g. shooting, passing) don't seem to be working off the same baseline of minutes played.
For example: take Emiliano Martínez (Argentina). The "90s" value should be consistent across each of these categories - but across the 5 categories below it varies extensively.
fbref.read_player_season_stats(stat_type="standard") = 2.0
fbref.read_player_season_stats(stat_type="shooting") = 2.0
fbref.read_player_season_stats(stat_type="goal_shot_creation") = 3.0
fbref.read_player_season_stats(stat_type="passing") = 3.0
fbref.read_player_season_stats(stat_type="defense") = 5.3
Note: This didn't seem to be an issue earlier in the tournament. Also, I only recently scraped "defense" statistics for the first time, so I wonder if somehow the results of old queries are being cached?
Also, when I navigate to the specific pages in by browser the data looks to be consistent & fully up to-date (i.e. a value of 6.3 for the "90s" attribute for Emiliano Martínez)
https://fbref.com/en/comps/1/passing/World-Cup-Stats
@probberechts commented on GitHub (Dec 16, 2022):
Yes, all data is cached by default. To pull up-to-date data you should use
socerdata.FBref(no_cache=True). To disable caching you can usesocerdata.FBref(no_store=True).@philbywalsh commented on GitHub (Dec 16, 2022):
Ah yes, much appreciated!