mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2024-11-24 04:31:50 +08:00
26 lines
591 B
JavaScript
26 lines
591 B
JavaScript
// 歌曲链接
|
|
|
|
const crypto = require('crypto');
|
|
|
|
module.exports = (query, request) => {
|
|
if (!('MUSIC_U' in query.cookie))
|
|
query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex');
|
|
query.cookie.os = 'pc';
|
|
const data = {
|
|
ids: '[' + query.id + ']',
|
|
br: parseInt(query.br || 999000),
|
|
};
|
|
return request(
|
|
'POST',
|
|
`https://interface3.music.163.com/eapi/song/enhance/player/url`,
|
|
data,
|
|
{
|
|
crypto: 'eapi',
|
|
cookie: query.cookie,
|
|
proxy: query.proxy,
|
|
realIP: query.realIP,
|
|
url: '/api/song/enhance/player/url',
|
|
},
|
|
);
|
|
};
|