probberechts / soccerdata

⛏⚽ Scrape soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, FotMob, Sofascore, SoFIFA, Understat and WhoScored.
https://soccerdata.readthedocs.io/en/latest/
Other
573 stars 101 forks source link

[FBref] HTTP error 500 reading team match stats for current season #359

Closed Manev100 closed 11 months ago

Manev100 commented 1 year ago

Hello,

I'm using Python 3.10.10 and soccerdata version 1.5.1.

The following code is returning "HTTPError: 500 Server Error: Internal Server Error"

fbref = sd.FBref(leagues="GER-Bundesliga", seasons="23") 
team_match_stats = fbref.read_team_match_stats(stat_type="shooting")

image

Same issue for other leagues and different stats. Earlier seasons work as expected.

It seems like the URL that is being requested (https://fbref.com/en/squads/0cdc4311/matchlogs/all_comps/shooting) is missing the season, https://fbref.com/en/squads/0cdc4311/matchlogs/2023-2024/all_comps/shooting opens the correct page.

Cheers