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