aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/util.py
diff options
context:
space:
mode:
authorAstound <kirito@disroot.org>2024-03-31 01:48:43 +0800
committerAstound <kirito@disroot.org>2024-03-31 01:48:43 +0800
commit8775e131afb8ed94c27a61d8346d1109e6a51a7d (patch)
treead5ea3e926395c9e4de5bbd976c38de7cf98a1a8 /youtube/util.py
parent1f16f7cb629df26cb05cdc2a331ec105c28bbfdc (diff)
downloadyt-local-8775e131afb8ed94c27a61d8346d1109e6a51a7d.tar.lz
yt-local-8775e131afb8ed94c27a61d8346d1109e6a51a7d.tar.xz
yt-local-8775e131afb8ed94c27a61d8346d1109e6a51a7d.zip
Temporal fix: all requests with ANDROID client get redirected to aQvGIIdgFDM video, hence the different "content not available"
Set YTMUSIC_ANDROID client instead, but it's just the matter of time before youtube updates that one too :(
Diffstat (limited to 'youtube/util.py')
-rw-r--r--youtube/util.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/youtube/util.py b/youtube/util.py
index 4c077f6..1dfdf7b 100644
--- a/youtube/util.py
+++ b/youtube/util.py
@@ -667,6 +667,25 @@ def to_valid_filename(name):
# https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/extractor/youtube.py#L72
INNERTUBE_CLIENTS = {
+ 'android_music': {
+ 'INNERTUBE_API_KEY': 'AIzaSyAOghZGza2MQSZkY_zfZ370N-PUdXEo8AI',
+ 'INNERTUBE_CONTEXT': {
+ 'client': {
+ 'hl': 'en',
+ 'gl': 'US',
+ 'clientName': 'ANDROID_MUSIC',
+ 'clientVersion': '6.44.54',
+ 'osName': 'Android',
+ 'osVersion': '14',
+ 'androidSdkVersion': 34,
+ 'platform': 'MOBILE',
+ 'userAgent': 'com.google.android.apps.youtube.music/6.44.54 (Linux; U; Android 14; US) gzip'
+ }
+ },
+ 'INNERTUBE_CONTEXT_CLIENT_NAME': 21,
+ 'REQUIRE_JS_PLAYER': False
+ },
+
'android': {
'INNERTUBE_API_KEY': 'AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w',
'INNERTUBE_CONTEXT': {