From 0bb66df4870b969ce7b485807c3abe445b66e4f1 Mon Sep 17 00:00:00 2001 From: Ken Liang Date: Tue, 27 Aug 2024 11:06:31 -0400 Subject: [PATCH 1/2] Update ESPN API Base Endpoint --- dao/platforms/espn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dao/platforms/espn.py b/dao/platforms/espn.py index 1932a234..bd22c6ec 100644 --- a/dao/platforms/espn.py +++ b/dao/platforms/espn.py @@ -54,7 +54,7 @@ def __init__(self, base_dir: Path, data_dir: Path, league_id: str, season: int, week_validation_function: Callable, save_data: bool = True, offline: bool = False): super().__init__( "ESPN", - "https://fantasy.espn.com", + "https://lm-api-reads.fantasy.espn.com", base_dir, data_dir, league_id, @@ -411,7 +411,7 @@ def map_data_to_base(self): - int(team_json["transactionCounter"].get("acquisitionBudgetSpent", 0)) ) base_team.url = ( - f"https://fantasy.espn.com/football/team" + f"https://lm-api-reads.fantasy.espn.com/football/team" f"?leagueId={self.league.league_id}&teamId={base_team.team_id}" ) From 81c539d7254eb687aafff5e1c608f3942446007e Mon Sep 17 00:00:00 2001 From: Aaron Sewall Date: Wed, 11 Sep 2024 23:46:33 -0400 Subject: [PATCH 2/2] Update requirements.txt Use espn-api==0.36.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 05616e52..d04f1f84 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ beautifulsoup4==4.12.2 camel-converter==3.1.1 colorama==0.4.6 -espn-api==0.33.0 +espn-api==0.36.0 GitPython==3.1.40 google-api-python-client==2.109.0 httplib2==0.22.0