mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
redo cookie modification with cookie parser
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// 歌曲链接
|
||||
|
||||
const crypto = require('crypto')
|
||||
|
||||
module.exports = (query, request) => {
|
||||
if(!('MUSIC_U' in query.cookie)) query.cookie._ntes_nuid = crypto.randomBytes(16).toString("hex")
|
||||
const data = {
|
||||
ids: '[' + parseInt(query.id) + ']',
|
||||
br: parseInt(query.br || 999000)
|
||||
}
|
||||
return request(
|
||||
'POST', `http://music.163.com/weapi/song/enhance/player/url`, data,
|
||||
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user