mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-02 08:13:18 +00:00
[ie/youtube] Improve tv
client context (#14122)
Closes #12563 Authored by: bashonly
This commit is contained in:
parent
526410b4af
commit
39b7b8ddc7
@ -952,7 +952,16 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
|||||||
headers=traverse_obj(self._get_default_ytcfg(client), {
|
headers=traverse_obj(self._get_default_ytcfg(client), {
|
||||||
'User-Agent': ('INNERTUBE_CONTEXT', 'client', 'userAgent', {str}),
|
'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
|
@staticmethod
|
||||||
def _build_api_continuation_query(continuation, ctp=None):
|
def _build_api_continuation_query(continuation, ctp=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user