mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-15 06:48:00 +09:00
[core] Make default upload_/release_date a compat_str
Ensures CBSLocal download test passes in Python 2 (pre-release from PR #29698)
This commit is contained in:
parent
ebf0fcd916
commit
015954f21a
@ -1529,7 +1529,7 @@ class YoutubeDL(object):
|
|||||||
# see http://bugs.python.org/issue1646728)
|
# see http://bugs.python.org/issue1646728)
|
||||||
try:
|
try:
|
||||||
upload_date = datetime.datetime.utcfromtimestamp(info_dict[ts_key])
|
upload_date = datetime.datetime.utcfromtimestamp(info_dict[ts_key])
|
||||||
info_dict[date_key] = upload_date.strftime('%Y%m%d')
|
info_dict[date_key] = compat_str(upload_date.strftime('%Y%m%d'))
|
||||||
except (ValueError, OverflowError, OSError):
|
except (ValueError, OverflowError, OSError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user