From 212ac056d842808a5dbb0564a81c3778c5ddb382 Mon Sep 17 00:00:00 2001 From: Robbie <79869161+Robert-litts@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:24:09 -0500 Subject: [PATCH] Update scoreboard function in league.py Updated scoreboard function for 2018 API JSON settings in league.py lines 184-187 --- espn_api/football/league.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/espn_api/football/league.py b/espn_api/football/league.py index 9a80a059..59fdf669 100644 --- a/espn_api/football/league.py +++ b/espn_api/football/league.py @@ -182,7 +182,11 @@ def scoreboard(self, week: int = None) -> List[Matchup]: params = { 'view': 'mMatchupScore', } - data = self.espn_request.league_get(params=params) + if self.year == 2018: + data = self.espn_request.league_get(params=params)[0] + else: + data = self.espn_request.league_get(params=params) + schedule = data['schedule'] matchups = [Matchup(matchup) for matchup in schedule if matchup['matchupPeriodId'] == week]