From 015954f21a369aa63101b3e9aca0ee06a340f93a Mon Sep 17 00:00:00 2001 From: dirkf Date: Tue, 22 Feb 2022 22:20:11 +0000 Subject: [PATCH] [core] Make default upload_/release_date a compat_str Ensures CBSLocal download test passes in Python 2 (pre-release from PR #29698) --- youtube_dl/YoutubeDL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index fe30758ef..69736acff 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -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