[youtube] Add visionos client to fix the endless 403s on download (#33293)

This commit is contained in:
BOplaid 2026-11-04 01:52:23 +03:30 committed by GitHub
parent f40489ee7e
commit dd9405e0ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,6 +90,22 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
# priority order for now
_INNERTUBE_CLIENTS = o_dict((
('visionos', {
'INNERTUBE_CONTEXT': {
'client': {
'clientName': 'VISIONOS',
'clientVersion': '1.02',
'deviceMake': 'Apple',
'deviceModel': 'RealityDevice17,1',
'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 15_7_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15',
'osName': 'visionOS',
'osVersion': '26.5.23O471',
},
},
'INNERTUBE_CONTEXT_CLIENT_NAME': 101,
'REQUIRE_JS_PLAYER': False,
'WITH_COOKIES': False,
}),
# Doesn't require a PoToken for some reason: thx yt-dlp/yt-dlp#14693
('android_sdkless', {
'INNERTUBE_CONTEXT': {