1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-02 00:03:00 +00:00

[ie/youtube] Improve tv client context (#14122)

Closes #12563
Authored by: bashonly
This commit is contained in:
bashonly 2025-08-22 18:44:32 -05:00 committed by GitHub
parent 526410b4af
commit 39b7b8ddc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -952,7 +952,16 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
headers=traverse_obj(self._get_default_ytcfg(client), {
'User-Agent': ('INNERTUBE_CONTEXT', 'client', 'userAgent', {str}),
}))
return self.extract_ytcfg(video_id, webpage) or {}
ytcfg = self.extract_ytcfg(video_id, webpage) or {}
# Workaround for https://github.com/yt-dlp/yt-dlp/issues/12563
if client == 'tv':
config_info = traverse_obj(ytcfg, (
'INNERTUBE_CONTEXT', 'client', 'configInfo', {dict})) or {}
config_info.pop('appInstallData', None)
return ytcfg
@staticmethod
def _build_api_continuation_query(continuation, ctp=None):