mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-03 15:12:10 +08:00
update: weapi ua 固定
This commit is contained in:
parent
7e869aa919
commit
1bc0b8f177
@ -96,6 +96,8 @@ const createRequest = (method, url, data = {}, options) => {
|
|||||||
}
|
}
|
||||||
// console.log(options.cookie, headers['Cookie'])
|
// console.log(options.cookie, headers['Cookie'])
|
||||||
if (options.crypto === 'weapi') {
|
if (options.crypto === 'weapi') {
|
||||||
|
headers['User-Agent'] =
|
||||||
|
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.69'
|
||||||
let csrfToken = (headers['Cookie'] || '').match(/_csrf=([^(;|$)]+)/)
|
let csrfToken = (headers['Cookie'] || '').match(/_csrf=([^(;|$)]+)/)
|
||||||
data.csrf_token = csrfToken ? csrfToken[1] : ''
|
data.csrf_token = csrfToken ? csrfToken[1] : ''
|
||||||
data = encrypt.weapi(data)
|
data = encrypt.weapi(data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user