A feature-rich command-line audio/video downloader
[extractor/youtube] Fix bug in b7c47b743871cdf3e0de75b17e4454d987384bf9
coletdjnz65141660aba6
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.pyindex c8541c6641..113b9aa07a 100644--- a/yt_dlp/extractor/youtube.py+++ b/yt_dlp/extractor/youtube.py@@ -475,13 +475,8 @@ class YoutubeBaseInfoExtractor(InfoExtractor):data=json.dumps(data).encode('utf8'), headers=real_headers,query={'key': api_key or self._extract_api_key(), 'prettyPrint': 'false'})- def extract_yt_initial_data(self, item_id, webpage):- return self._search_json(self._YT_INITIAL_DATA_RE, webpage, 'yt initial data', item_id, fatal=True)-- def _extract_yt_initial_variable(self, webpage, regex, video_id, name):- return self._parse_json(self._search_regex(- (fr'{regex}\s*{self._YT_INITIAL_BOUNDARY_RE}',- regex), webpage, name, default='{}'), video_id, fatal=False, lenient=True)+ def extract_yt_initial_data(self, item_id, webpage, fatal=True):+ return self._search_json(self._YT_INITIAL_DATA_RE, webpage, 'yt initial data', item_id, fatal=fatal)@staticmethoddef _extract_session_index(*data):