diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index c23e65cc51..5ac49ff728 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -271,7 +271,8 @@ 'INNERTUBE_CONTEXT': { 'client': { 'clientName': 'TVHTML5', - 'clientVersion': '7.20241201.18.00', + 'clientVersion': '7.20250120.19.00', + 'userAgent': 'Mozilla/5.0 (ChromiumStylePlatform) Cobalt/Version', }, }, 'INNERTUBE_CONTEXT_CLIENT_NAME': 7, @@ -853,11 +854,15 @@ def _download_ytcfg(self, client, video_id): 'web': 'https://www.youtube.com', 'web_music': 'https://music.youtube.com', 'web_embedded': f'https://www.youtube.com/embed/{video_id}?html5=1', + 'tv': 'https://www.youtube.com/tv', }.get(client) if not url: return {} webpage = self._download_webpage( - url, video_id, fatal=False, note=f'Downloading {client.replace("_", " ").strip()} client config') + url, video_id, fatal=False, note=f'Downloading {client.replace("_", " ").strip()} client config', + headers=traverse_obj(self._get_default_ytcfg(client), { + 'User-Agent': ('INNERTUBE_CONTEXT', 'client', 'userAgent', {str}), + })) return self.extract_ytcfg(video_id, webpage) or {} @staticmethod