diff --git a/soccer/writers.py b/soccer/writers.py index 514efb6..2768694 100644 --- a/soccer/writers.py +++ b/soccer/writers.py @@ -307,11 +307,11 @@ def team_scores(self, team_scores, time): def standings(self, league_table, league): """Store output of league standings to a JSON file""" data = [] - for team in league_table['standing']: + for team in league_table['standings'][0]['table']: item = {'position': team['position'], - 'teamName': team['teamName'], + 'teamName': team['team'], 'playedGames': team['playedGames'], - 'goalsFor': team['goals'], + 'goalsFor': team['goalsFor'], 'goalsAgainst': team['goalsAgainst'], 'goalDifference': team['goalDifference'], 'points': team['points']}