Save failed downloads to file

This commit is contained in:
Anthony Wang 2022-01-22 22:50:45 -06:00
parent 88462d61a8
commit c4bec9dc87
Signed by: a
GPG key ID: BC96B00AEC5F2D76

View file

@ -16,6 +16,8 @@ parser.add_argument('--force', '-f', help = 'force download all links', action='
args = parser.parse_args()
failed = []
for category in os.listdir('Links'):
print('🔍 Examining: ' + category)
os.makedirs(category, exist_ok=True)
@ -44,3 +46,8 @@ for category in os.listdir('Links'):
exit()
except:
print('😱 Error when printing')
failed.append(name)
# Output failed downloads
print(failed)
print(failed, file=open('failed', 'w'))