1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-22 10:11:52 +00: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:
dirkf 2022-02-22 22:20:11 +00:00
parent ebf0fcd916
commit 015954f21a

View file

@ -1529,7 +1529,7 @@ class YoutubeDL(object):
# see http://bugs.python.org/issue1646728)
try:
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):
pass