Skip to content

Commit

Permalink
Merge pull request #168 from Hakkin/android
Browse files Browse the repository at this point in the history
Fix fetching Android player response.
  • Loading branch information
Kethsar authored Dec 14, 2023
2 parents 77c2f5c + d6a4be6 commit 5d91faa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions player_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ const (
'context': {
'client': {
'clientName': 'ANDROID',
'clientVersion': '16.20',
'clientVersion': '17.31.35',
'hl': 'en'
}
},
'videoId': '%s',
'params': 'CgIQBg==',
'playbackContext': {
'contentPlaybackContext': {
'html5Preference': 'HTML5_PREF_WANTS'
Expand Down Expand Up @@ -274,7 +275,7 @@ func (di *DownloadInfo) DownloadAndroidPlayerResponse() (*PlayerResponse, error)
}

req.Header.Add("X-YouTube-Client-Name", "3")
req.Header.Add("X-YouTube-Client-Version", "16.20")
req.Header.Add("X-YouTube-Client-Version", "17.31.35")
req.Header.Add("Origin", "https://www.youtube.com")
req.Header.Add("content-type", "application/json")

Expand Down

0 comments on commit 5d91faa

Please sign in to comment.