upload_date can be none

This commit is contained in:
j 2016-08-23 17:44:30 +02:00
parent 83c2e25aac
commit 479432f01a

View file

@ -55,9 +55,9 @@ def get_info(url):
for k in info_keys
if k in i and i[k]
})
if not 'tags' in info[-1]:
if 'tags' not in info[-1]:
info[-1]['tags'] = []
if 'upload_date' in i:
if 'upload_date' in i and i['upload_date']:
info[-1]['date'] = '-'.join([i['upload_date'][:4], i['upload_date'][4:6], i['upload_date'][6:]])
return info