Replies: 1 comment 3 replies
-
I agree. In addition, on Chrome, "copy everything starting from “accept: */*” to the end of the section" (from the document) results in
, which will not be parsed correctly. Instead, one can use "Copy as fetch" of Chrome inspector. fetch("https://music.youtube.com/youtubei/v1/browse?...", {
"headers": {
"accept": "*/*",
"accept-language": "ja,en-US;q=0.9,en;q=0.8",
"authorization": "SAPISIDHASH ...",
"cache-control": "no-cache",
"content-type": "application/json",
"pragma": "no-cache",
"sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
"sec-ch-ua-arch": "\"x86\"",
"sec-ch-ua-bitness": "\"64\"",
"sec-ch-ua-full-version": "\"115.0.5790.171\"",
"sec-ch-ua-full-version-list": "\"Not/A)Brand\";v=\"99.0.0.0\", \"Google Chrome\";v=\"115.0.5790.171\", \"Chromium\";v=\"115.0.5790.171\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-model": "\"\"",
"sec-ch-ua-platform": "\"Windows\"",
"sec-ch-ua-platform-version": "\"14.0.0\"",
"sec-ch-ua-wow64": "?0",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "same-origin",
"sec-fetch-site": "same-origin",
"x-client-data": "...",
"x-goog-authuser": "0",
"x-goog-visitor-id": "...",
"x-origin": "https://music.youtube.com",
"x-youtube-bootstrap-logged-in": "true",
"x-youtube-client-name": "67",
"x-youtube-client-version": "1.20230731.00.00"
},
"referrer": "https://music.youtube.com/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "...",
"method": "POST",
"mode": "cors",
"credentials": "include"
}); So, one can simply use the headers part as browser.json. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm using
ytmusicapi
in school project. Thank you for this.When I try "Browser authentication" like
and
browser.txt
like so, notice there is noAuthorization
field.When I add it, works fine.
If I don't add it, error raised.
I think key
Authorization
should add in the doc example.ytmusicapi/docs/source/setup/headers_auth.json.example
Lines 1 to 9 in ef312d7
Beta Was this translation helpful? Give feedback.
All reactions