mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
[utils] Add try error type
This commit is contained in:
parent
a50fd6e026
commit
f0ebaff543
@ -1063,7 +1063,7 @@ def unified_strdate(date_str, day_first=True):
|
||||
for expression in format_expressions:
|
||||
try:
|
||||
upload_date = datetime.datetime.strptime(date_str, expression).strftime('%Y%m%d')
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
if upload_date is None:
|
||||
timetuple = email.utils.parsedate_tz(date_str)
|
||||
|
Loading…
x
Reference in New Issue
Block a user