[ie/youtube] Add web_embedded fallback for android_vr client (#15785)

Closes #15751, Closes #15780
Authored by: bashonly
This commit is contained in:
bashonly
2026-01-31 16:48:41 -06:00
committed by GitHub
parent bf5d8c2a66
commit bb1c05752c
2 changed files with 10 additions and 1 deletions

View File

@@ -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}')