added new espn api golf data
This commit is contained in:
parent
e167f234e1
commit
5c042c9c09
@ -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']
|
||||
|
Loading…
Reference in New Issue
Block a user