Skip to content

Commit

Permalink
Switch to android test suite client by default
Browse files Browse the repository at this point in the history
Invidious' solution to the destruction of the android client:
iv-org/invidious#4650

Fixes user234683#207
  • Loading branch information
user234683 committed Jun 8, 2024
1 parent 7853449 commit a8e34ff
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions youtube/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,30 @@ def to_valid_filename(name):
'REQUIRE_JS_PLAYER': False,
},

'android-test-suite': {
'INNERTUBE_API_KEY': 'AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w',
'INNERTUBE_CONTEXT': {
'client': {
'hl': 'en',
'gl': 'US',
'clientName': 'ANDROID_TESTSUITE',
'clientVersion': '1.9',
'osName': 'Android',
'osVersion': '12',
'androidSdkVersion': 31,
'platform': 'MOBILE',
'userAgent': 'com.google.android.youtube/1.9 (Linux; U; Android 12; US) gzip'
},
# https://github.com/yt-dlp/yt-dlp/pull/575#issuecomment-887739287
#'thirdParty': {
# 'embedUrl': 'https://google.com', # Can be any valid URL
#}
},
'INNERTUBE_CONTEXT_CLIENT_NAME': 3,
'REQUIRE_JS_PLAYER': False,
},



'ios': {
'INNERTUBE_API_KEY': 'AIzaSyB-63vPrdThhKuerbB2N_l7Kwwcxj6yUAc',
Expand Down
2 changes: 1 addition & 1 deletion youtube/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def extract_info(video_id, use_invidious, playlist_id=None, index=None):
gevent.spawn(fetch_watch_page_info, video_id, playlist_id, index),


gevent.spawn(fetch_player_response, 'ios', video_id)
gevent.spawn(fetch_player_response, 'android-test-suite', video_id)
)
gevent.joinall(tasks)
util.check_gevent_exceptions(*tasks)
Expand Down

0 comments on commit a8e34ff

Please sign in to comment.