1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-06-05 20:43:32 +08:00

[utils] Add try error type

This commit is contained in:
Dainese Hsiao
2016-06-19 12:05:33 +08:00
Unverified
parent a50fd6e026
commit f0ebaff543
+1 -1
View File
@@ -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)