Merge pull request #35 from popeyelau/main

update youtube api params
pull/37/head
肥羊 3 years ago committed by GitHub
commit 245efce0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Golang/liveurls/youtube.go

@ -42,7 +42,7 @@ func (y *Youtube) GetLiveUrl() any {
//Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)},
}
json := []byte(fmt.Sprintf(`{"context": {"client": {"hl": "zh","clientVersion": "16.20","clientName": "ANDROID"}},"videoId": "%s"}`, y.Rid))
json := []byte(fmt.Sprintf(`{"context": {"client": {"hl": "zh","clientVersion": "2.20201021.03.00","clientName": "WEB"}},"videoId": "%s"}`, y.Rid))
reqBody := bytes.NewBuffer(json)
r, _ := http.NewRequest("POST", "https://www.youtube.com/youtubei/v1/player", reqBody)
r.Header.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")

Loading…
Cancel
Save