try except for date 2
This commit is contained in:
parent
949b64f28c
commit
150aa672ec
@ -1026,7 +1026,10 @@ def updateLeagueEvents(api_key, time, logf):
|
||||
for d in all_data[league][ten_or_fifteen]:
|
||||
event = {}
|
||||
event['date'] = d['dateEvent']
|
||||
event['date2'] = d['dateEvent2']
|
||||
try:
|
||||
event['date2'] = d['dateEvent2']
|
||||
except:
|
||||
pass
|
||||
|
||||
if time == 'live':
|
||||
event['progess'] = d['strProgress']
|
||||
@ -1034,7 +1037,10 @@ def updateLeagueEvents(api_key, time, logf):
|
||||
else:
|
||||
if (league == 'PGA') or (league == 'LPGA') or (league == 'PGA_EU') or (league == 'LIV') or (league == 'F1') or (league == 'NASCAR'):
|
||||
event['date'] = d['dateEvent']
|
||||
event['date2'] = d['dateEvent2']
|
||||
try:
|
||||
event['date2'] = d['dateEvent2']
|
||||
except:
|
||||
pass
|
||||
event['event'] = d['strEvent'].replace("\u2019","'")
|
||||
event['venue'] = d['strVenue'].replace("\u2019","'")
|
||||
event['city'] = d['strCity'].replace("\u2019","'")
|
||||
|
Loading…
Reference in New Issue
Block a user