Skip to content

Commit

Permalink
Update Android client versions in YouTubeVideoUrl, thx bashonly
Browse files Browse the repository at this point in the history
  • Loading branch information
Taapat committed Mar 10, 2024
1 parent 6cdce04 commit 30754d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/YouTubeVideoUrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _extract_dash_audio_format(self, streaming_formats):
def _extract_player_response(self, video_id, client):
player_id = None
url = 'https://www.youtube.com/youtubei/v1/player?key=%s&bpctr=9999999999&has_verified=1' % (YT_EMBKEY if client == 85 else YT_KEY)
USER_AGENT = 'com.google.android.youtube/17.31.35 (Linux; U; Android 12) gzip'
USER_AGENT = 'com.google.android.youtube/19.09.37 (Linux; U; Android 12) gzip'
data = {
'videoId': video_id,
'playbackContext': {
Expand Down Expand Up @@ -259,7 +259,7 @@ def _extract_player_response(self, video_id, client):
data['context'] = {
'client': {
'hl': config.plugins.YouTube.searchLanguage.value,
'clientVersion': '17.31.35',
'clientVersion': '19.09.37',
'androidSdkVersion': 31,
'clientName': 'ANDROID',
'osName': 'Android',
Expand All @@ -269,7 +269,7 @@ def _extract_player_response(self, video_id, client):
}
data['params'] = 'CgIQBg'
headers['X-YouTube-Client-Name'] = 3
headers['X-YouTube-Client-Version'] = '17.31.35'
headers['X-YouTube-Client-Version'] = '19.09.37'
headers['User-Agent'] = USER_AGENT
try:
return loads(self._download_webpage(url, data, headers)), player_id
Expand Down

0 comments on commit 30754d6

Please sign in to comment.