From 5c042c9c099288a515dcfaab5f0b00ed4260656d Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 17 May 2023 12:29:23 +0800 Subject: [PATCH] added new espn api golf data --- database_caller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/database_caller.py b/database_caller.py index fee35bd..97abfb5 100755 --- a/database_caller.py +++ b/database_caller.py @@ -1066,6 +1066,12 @@ def updateLeagueEvents(api_key, time, logf): event['date2'] = d['dateEvent2'] except: pass + try: + event['total_yards'] = d['total_yards'] + event['shots_par'] = d['shots_par'] + event['purse'] = d['purse'] + except: + pass event['event'] = d['strEvent'].replace("\u2019","'") event['venue'] = d['strVenue'].replace("\u2019","'") event['city'] = d['strCity'].replace("\u2019","'") @@ -1080,6 +1086,7 @@ def updateLeagueEvents(api_key, time, logf): if time != 'upcoming': if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU'): event['golf_standings'] = d['strResult'] + event['golf_rankings'] = d['player_results'] rank = ['n1', 'n2', 'n3', 'n4', 'n5', 'n6', 'n7', 'n8', 'n9', 'n10', 'T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10'] @@ -1117,6 +1124,7 @@ def updateLeagueEvents(api_key, time, logf): elif (league == 'LIV'): event['golf_standings'] = d['strResult'] + event['golf_rankings'] = d['player_results'] rank = ['n1', 'n2', 'n3', 'n4', 'n5', 'n6', 'n7', 'n8', 'n9', 'n10', 'T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10']