upload_date can be none
This commit is contained in:
parent
83c2e25aac
commit
479432f01a
1 changed files with 2 additions and 2 deletions
|
@ -55,9 +55,9 @@ def get_info(url):
|
||||||
for k in info_keys
|
for k in info_keys
|
||||||
if k in i and i[k]
|
if k in i and i[k]
|
||||||
})
|
})
|
||||||
if not 'tags' in info[-1]:
|
if 'tags' not in info[-1]:
|
||||||
info[-1]['tags'] = []
|
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:]])
|
info[-1]['date'] = '-'.join([i['upload_date'][:4], i['upload_date'][4:6], i['upload_date'][6:]])
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue