continue if download fails

This commit is contained in:
j 2018-08-10 11:33:32 +01:00
parent 09b68b9f6f
commit 52057a8880

View file

@ -64,7 +64,10 @@ if __name__ == '__main__':
if not os.path.exists(abspath): if not os.path.exists(abspath):
url = 'https://%s/%s/download/source/%s' % (site, id, part) url = 'https://%s/%s/download/source/%s' % (site, id, part)
print('downloading', abspath[len(target):]) print('downloading', abspath[len(target):])
api.save_url(url, abspath) try:
api.save_url(url, abspath)
except:
print('failed to download', url)
keep.append(unicodedata.normalize('NFD', abspath)) keep.append(unicodedata.normalize('NFD', abspath))
for root, folders, files in os.walk(target): for root, folders, files in os.walk(target):