Closed martinwilliamsiet closed 2 weeks ago
I'm facing the same problem scraping MLS data from the last 4 seasons, I can obtain the first 3 seasons correctly, but the current one raises the same error for every feature (stat_type) and I don't know how to fix it either.
Note that the Argentinian league and MLS are not supported. If you want to scrape data for these leagues, it is up to you to adapt the code accordingly.
It seems to work fine for the big five leagues, both for the current and previous seasons.
import soccerdata as sd
fbref = sd.FBref("ENG-Premier League", [2223, 2324], no_cache=True)
fbref.read_team_match_stats(team="Manchester City")
This might have been fixed as a side effect of #613.
Thanks! I attempted to fork and fix on my own but it caused 429 errors and was in the middle of figuring out why that happened. I am concatenating dataframes and pulling data from it and it may have been too much to handle with the source change. I'm unsure how to send you what I did, merging did not work for me. I will try again soon, thank you for the fix!
Hi!
I'm using Python 3.11.9 and soccerdata version 1.7.1.
The following code is returning "HTTPError: 500 Server Error: Internal Server Error"
Same issue for other leagues, big 5 included, and with different stat types.
It appears that the URL that is being requested (https://fbref.com/en/squads/4bee7ba3/2023-2024/matchlogs/all_comps/misc) is incorrect for only team match stats, (https://fbref.com/en/squads/4bee7ba3/2024/matchlogs/all_comps/misc) also doesn't work for current season, but (https://fbref.com/en/squads/4bee7ba3/2023/matchlogs/all_comps/misc) and previous years, with just one year listed in link after squad identifier, all appear to open the correct page.
Thanks in advance!
Edit: I have set up start and end months for all leagues in league dictionary correctly.