[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