[GH-ISSUE #704] Incorrect match schedule for 2023-24 Season #150

Closed
opened 2026-03-02 15:56:12 +03:00 by kerem · 1 comment
Owner

Originally created by @lowkenji-464 on GitHub (Sep 13, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/704

Describe the bug
fbref = sd.FBref(leagues="ENG-Premier League", seasons=[23])

The data cached in the above function does not return the correct data when used with (fbref.read_season() or fbref.read_schedule()) and consequently returns the incorrect match level data for functions like .read_shot_events() functions (currently for '2023-24' season it returns data from '2024-2025' season.

Believe this is due to an incorrect URL being linked to the season (can be repro using .read_seasons() function) i.e.

Incorrect URL (current): /en/comps/9/Premier-League-Stats
Correct/Proposed URL: en/comps/9/2023-2024/2023-2024-Premier-League-Stats

Affected scrapers
This affects the following scrapers:

  • ClubElo
  • ESPN
  • FBref
  • FiveThirtyEight
  • FotMob
  • Match History
  • SoFIFA
  • Understat
  • WhoScored

Code example
N/A

import soccerdata as sd
fbref = sd.FBref(leagues="ENG-Premier League", seasons="24/25", no_cache=True)
fbref.read_schedule()

Error message

<paste the error message here>

Additional context
Add any other context about the problem here.

Contributor Action Plan

  • I can fix this issue and will submit a pull request.
  • I’m unsure how to fix this, but I'm willing to work on it with guidance.
  • I’m not able to fix this issue.
Originally created by @lowkenji-464 on GitHub (Sep 13, 2024). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/704 **Describe the bug** fbref = sd.FBref(leagues="ENG-Premier League", seasons=[23]) The data cached in the above function does not return the correct data when used with (fbref.read_season() or fbref.read_schedule()) and consequently returns the incorrect match level data for functions like .read_shot_events() functions (currently for '2023-24' season it returns data from '2024-2025' season. Believe this is due to an incorrect URL being linked to the season (can be repro using .read_seasons() function) i.e. **Incorrect URL (current):** /en/comps/9/Premier-League-Stats **Correct/Proposed URL:** en/comps/9/2023-2024/2023-2024-Premier-League-Stats **Affected scrapers** This affects the following scrapers: - [ ] ClubElo - [ ] ESPN - [X] FBref - [ ] FiveThirtyEight - [ ] FotMob - [ ] Match History - [ ] SoFIFA - [ ] Understat - [ ] WhoScored **Code example** N/A ```python import soccerdata as sd fbref = sd.FBref(leagues="ENG-Premier League", seasons="24/25", no_cache=True) fbref.read_schedule() ``` **Error message** ``` <paste the error message here> ``` **Additional context** Add any other context about the problem here. **Contributor Action Plan** - [ ] I can fix this issue and will submit a pull request. - [X] I’m unsure how to fix this, but I'm willing to work on it with guidance. - [ ] I’m not able to fix this issue.
kerem 2026-03-02 15:56:12 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@probberechts commented on GitHub (Oct 10, 2024):

I think the solution might simply be to use no_cache=True once to update the URL's. I know it's tricky, but FBref updates the URL's each season.

<!-- gh-comment-id:2405473881 --> @probberechts commented on GitHub (Oct 10, 2024): I think the solution might simply be to use `no_cache=True` once to update the URL's. I know it's tricky, but FBref updates the URL's each season.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#150
No description provided.