From 70cb453280a748733b36946ea81866d1de4a056a Mon Sep 17 00:00:00 2001 From: Astound Date: Sun, 31 Mar 2024 04:43:11 +0800 Subject: Set 'ios' client to bypass absidue notes that blockage of the android client is collateral damage due to YouTube's war with ReVanced. Switching to iOS should keep us out of the line of fire for now: https://github.com/yt-dlp/yt-dlp/issues/9554#issuecomment-2026828421 --- youtube/util.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'youtube/util.py') diff --git a/youtube/util.py b/youtube/util.py index 1dfdf7b..6e501bc 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -709,6 +709,22 @@ INNERTUBE_CLIENTS = { 'REQUIRE_JS_PLAYER': False, }, + 'ios': { + 'INNERTUBE_API_KEY': 'AIzaSyB-63vPrdThhKuerbB2N_l7Kwwcxj6yUAc', + 'INNERTUBE_CONTEXT': { + 'client': { + 'hl': 'en', + 'gl': 'US', + 'clientName': 'IOS', + 'clientVersion': '19.12.3', + 'deviceModel': 'iPhone14,3', + 'userAgent': 'com.google.ios.youtube/19.12.3 (iPhone14,3; U; CPU iOS 15_6 like Mac OS X)' + } + }, + 'INNERTUBE_CONTEXT_CLIENT_NAME': 5, + 'REQUIRE_JS_PLAYER': False + }, + # This client can access age restricted videos (unless the uploader has disabled the 'allow embedding' option) # See: https://github.com/zerodytrash/YouTube-Internal-Clients 'tv_embedded': { -- cgit v1.2.3