diff --git a/database_caller.py b/database_caller.py index 00cf731..908978b 100755 --- a/database_caller.py +++ b/database_caller.py @@ -463,32 +463,32 @@ def updateLeagueEvents(api_key, time): print(all_data) - events = [] + #events = [] - for league in all_data.keys(): - for d in all_data[league]: - event = {} - event['date'] = d['dateEvent'] + #for league in all_data.keys(): + #for d in all_data[league]: + #event = {} + #event['date'] = d['dateEvent'] - if time == 'live': + #if time == 'live': - event['progess'] = d['strProgress'] - event['status'] = d['strStatus'] - else: + #event['progess'] = d['strProgress'] + #event['status'] = d['strStatus'] + #else: - event['round'] = d['intRound'] - event['time'] = d['strTime'] - event['home_team'] = d['strHomeTeam'] + #event['round'] = d['intRound'] + #event['time'] = d['strTime'] + #event['home_team'] = d['strHomeTeam'] - event['away_team'] = d['strAwayTeam'] + #event['away_team'] = d['strAwayTeam'] - if time != 'upcoming': - event['away_score'] = d['intAwayScore'] - event['home_score'] = d['intHomeScore'] + #if time != 'upcoming': + #event['away_score'] = d['intAwayScore'] + #event['home_score'] = d['intHomeScore'] - events.append(event) - leagues_info[league.upper()] = events - all_settings['leagues'] = leagues_info + #events.append(event) + #leagues_info[league.upper()] = events + all_settings['leagues'] = all_data json.dump(all_settings, open( "csv/{}_games.json".format(time), 'w+' )) except Exception as e: