mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-07-22 09:27:11 +00:00
[ie/youtube] Fix web_embedded player client (#16177)
Closes #16077 Authored by: SparseOrnament15, bashonly Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
co-authored by
bashonly
parent
7e145ac1ca
commit
f2bd3202c0
@@ -368,7 +368,7 @@ def short_client_name(client_name):
|
||||
|
||||
def _fix_embedded_ytcfg(ytcfg):
|
||||
ytcfg['INNERTUBE_CONTEXT'].setdefault('thirdParty', {}).update({
|
||||
'embedUrl': 'https://www.youtube.com/', # Can be any valid URL
|
||||
'embedUrl': 'https://www.reddit.com/', # Can be any valid non-YouTube URL
|
||||
})
|
||||
|
||||
|
||||
@@ -967,6 +967,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
||||
url, video_id, note=f'Downloading {client.replace("_", " ").strip()} client config',
|
||||
headers=traverse_obj(self._get_default_ytcfg(client), {
|
||||
'User-Agent': ('INNERTUBE_CONTEXT', 'client', 'userAgent', {str}),
|
||||
'Referer': ('INNERTUBE_CONTEXT', 'thirdParty', 'embedUrl', {str}),
|
||||
}))
|
||||
|
||||
ytcfg = self.extract_ytcfg(video_id, webpage) or {}
|
||||
|
||||
Reference in New Issue
Block a user