mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[GH-ISSUE #820] [Sofascore] Allow retrieving leagues from other regions #176
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#176
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 @jbrepogmailcom on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/820
Describe the bug
Hello. In the documentation, it is advised to add more leagues for sofascore by going to https://api.sofascore.com/api/v1/config/unique-tournaments/EN/football
However, I was looking for Czech 1st league and I did not find it there. But I found it on this page:
https://api.sofascore.com/api/v1/config/unique-tournaments/CZ/football
So I modified my local sofascore.py to read from that page and I created custom entry for league
{
"CZE-Czech First League": {
"Sofascore": "Czech First League"
}
}
Unfortunately, that did not work and I am still getting index errors (even when I leave entries for other scrapers there)
Can you please advise how to use other leagues from that second URL?
Affected scrapers
This affects the following scrapers:
sofascore.py
Code example
A minimal code example that fails. Use
no_cache=Trueto make sure an invalid cached file does not cause the bug and make sure you have the latest version of soccerdata installed.Error message
Additional context
Add any other context about the problem here.
Contributor Action Plan
@jbrepogmailcom commented on GitHub (Mar 18, 2025):
OK it started to work after I deleted cached files :-)
However, I would recommend to adjust the configuration in the way that if someone wants to explore league that is not in ../EN/.. folder, but in some other, it could customize the configuration. Like in imported leagues file
@Brahim2796 commented on GitHub (May 26, 2025):
How to delete cached files??
I add norway league as explained in the documentation , it did not work
@probberechts commented on GitHub (May 27, 2025):
See https://soccerdata.readthedocs.io/en/latest/intro.html#data-caching