mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-03-14 06:02:47 +03:00
[ie/youtube] Add web_embedded fallback for android_vr client (#15785)
Closes #15751, Closes #15780 Authored by: bashonly
This commit is contained in:
@@ -3118,6 +3118,15 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
else:
|
||||
prs.append(pr)
|
||||
|
||||
if (
|
||||
# Is this a "made for kids" video that can't be downloaded with android_vr?
|
||||
client == 'android_vr' and self._is_unplayable(pr)
|
||||
and webpage and 'made for kids' in webpage
|
||||
# ...and is a JS runtime is available?
|
||||
and any(p.is_available() for p in self._jsc_director.providers.values())
|
||||
):
|
||||
append_client('web_embedded')
|
||||
|
||||
# web_embedded can work around age-gate and age-verification for some embeddable videos
|
||||
if self._is_agegated(pr) and variant != 'web_embedded':
|
||||
append_client(f'web_embedded.{base_client}')
|
||||
|
||||
Reference in New Issue
Block a user