From 700ccbe3f14e9b1f3708a562efc57361c14dee68 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 24 Mar 2022 05:13:57 +0530 Subject: [PATCH] [extractor] Allow control characters inside json Closes #3174 --- yt_dlp/extractor/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index f3ae3fd4c5..e1a6610337 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1033,7 +1033,7 @@ def _parse_json(self, json_string, video_id, transform_source=None, fatal=True): if transform_source: json_string = transform_source(json_string) try: - return json.loads(json_string) + return json.loads(json_string, strict=False) except ValueError as ve: errmsg = '%s: Failed to parse JSON ' % video_id if fatal: