Save failed downloads to file
This commit is contained in:
parent
88462d61a8
commit
c4bec9dc87
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue