From 46f42a388b65526b37bba0ef45183676040e7db7 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 3 Mar 2022 23:01:42 +0800 Subject: [PATCH] fixing premier league --- database_caller.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/database_caller.py b/database_caller.py index 0d67ddd..2341711 100755 --- a/database_caller.py +++ b/database_caller.py @@ -379,8 +379,8 @@ def updateLeagueTables(api_key): leagues_info = {} for league in leagues: - if league == 'Premier League': - url += 'PL,' + if league == 'PREMIERLEAGUE': + url += 'premierleague,' else: url += league + ',' @@ -450,8 +450,8 @@ def updateLeagueEvents(api_key, time): for league in leagues: - if league == 'Premier League': - url += 'PL,' + if league == 'PREMIERLEAGUE': + url += 'premierleague,' else: url += league + ',' url = url[:-1] # remove last comma @@ -487,7 +487,7 @@ def updateLeagueEvents(api_key, time): event['home_score'] = d['intHomeScore'] events.append(event) - leagues_info[league] = events + leagues_info[league.upper()] = events all_settings['leagues'] = leagues_info json.dump(all_settings, open( "csv/{}_games.json".format(time), 'w+' ))