mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 18:15:58 +03:00
[GH-ISSUE #63] [FBref] 403 client error #8
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#8
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 @clumsycompiler on GitHub (Jul 18, 2022).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/63
Steps to recreate the problem:
import soccerdata as sd
fbref = sd.FBref(leagues="ENG-Premier League", seasons=2021)
team_season_stats = fbref.read_team_season_stats(stat_type="standard")
team_season_stats.head()
Error:
[07/18/22 09:33:53] ERROR Error while scraping https://fbref.com/en/comps/. _common.py:349
Retrying... (attempt 1 of 5).
Traceback (most recent call last):
File "/home/dkblu/anaconda3/envs/sportsdata/lib/python3.9/site-packages/soccerdata/_common.py",
line 343, in _download_and_save
return io.BytesIO(response.content)
File "/home/dkblu/anaconda3/envs/sportsdata/lib/python3.9/site-packages/requests/models.py",
line 960,
in raise_for_status
raise HTTPError(http_error_msg,
response=self)
requests.exceptions.HTTPError: 403 Client Error:
Forbidden for url: https://fbref.com/en/comps/
@probberechts commented on GitHub (Jul 18, 2022):
This is probably related to #59.
Make sure you use v1.0.2. You can check your version with:
@clumsycompiler commented on GitHub (Jul 19, 2022):
upgraded the version, works fine. Thank you