From 56af1f0735edd903481f4b09c15326bd7f85c7be Mon Sep 17 00:00:00 2001 From: sherl Date: Mon, 29 Dec 2025 23:32:06 +0100 Subject: [PATCH] fix: adjust initialData extraction for new a/b change --- ythdd_extractor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ythdd_extractor.py b/ythdd_extractor.py index 82f6c7c..f44e603 100644 --- a/ythdd_extractor.py +++ b/ythdd_extractor.py @@ -223,9 +223,9 @@ def WEBextractSinglePage(uri: str, use_cookies=None): response = requests.get("https://www.youtube.com/watch?v=" + uri, headers=ythdd_globals.getHeaders(caller='extractor'), cookies=cookies) extracted_string = str(response.content.decode('utf8', 'unicode_escape')) - start = extracted_string.find('{"responseContext":{"serviceTrackingParams":') + start = extracted_string.find('{"responseContext":') end = extracted_string.find(';var ', start) - start2 = extracted_string.find('{"responseContext":{"serviceTrackingParams":', start + 1) + start2 = extracted_string.find('{"responseContext":', start + 1) end2 = extracted_string.find(';', start2) extracted_json1 = json.loads(extracted_string[start:end]) extracted_json2 = json.loads(extracted_string[start2:end2])