logo_files list
This commit is contained in:
parent
154121b3d9
commit
c850d0233c
@ -917,6 +917,7 @@ def updateLeagueEvents(api_key, time, logf):
|
||||
events.append(event)
|
||||
if time == 'upcoming':
|
||||
try:
|
||||
logo_files = []
|
||||
for each in all_data['UFC'][0]['fights']:
|
||||
if each['fighter1pic'].split('/')[-1] not in os.listdir('logos/ufc/'):
|
||||
urllib.request.urlretrieve(each['fighter1pic'],'logos/ufc/' + each['fighter1pic'].split('/')[-1])
|
||||
@ -937,6 +938,7 @@ def updateLeagueEvents(api_key, time, logf):
|
||||
pass
|
||||
elif time == 'past':
|
||||
try:
|
||||
logo_files = []
|
||||
for each in all_data['UFC'][0]['fights']:
|
||||
if each['fighter1pic'].split('/')[-1] not in os.listdir('logos/ufc_past/'):
|
||||
urllib.request.urlretrieve(each['fighter1pic'],'logos/ufc_past/' + each['fighter1pic'].split('/')[-1])
|
||||
|
Loading…
Reference in New Issue
Block a user