diff --git a/module/lyric.js b/module/lyric.js index 6123eb2..129c603 100644 --- a/module/lyric.js +++ b/module/lyric.js @@ -13,8 +13,8 @@ module.exports = (params, useAxios) => { return new Promise((resolve, reject) => { useAxios({ - baseURL: 'https://lyrics.kugou.com', - url: '/download', + baseURL: 'https://lyrics.kugou.com', + url: '/download', method: 'GET', params: dataMap, cookie: params?.cookie || {}, diff --git a/module/song_url.js b/module/song_url.js index 45379e2..cfcf62e 100644 --- a/module/song_url.js +++ b/module/song_url.js @@ -1,6 +1,16 @@ // 获取音乐urls +// quality 支持 魔法音乐 +// piano 钢琴 +// acappella 人声 伴奏 分离 +// subwoofer 乐器 +// ancient 尤克里里 +// dj dj module.exports = (params, useAxios) => { + const quality = ['piano', 'acappella', 'subwoofer', 'ancient', 'dj'].includes(params.quality) ? `magic_${params?.quality}` : params.quality; + const dataMap = { + album_audio_id: Number(params.album_audio_id ?? 0), + area_code: 1, hash: params?.hash || '', vipType: params?.cookie?.vip_type || params?.vipType || 0, // 该参数不影响url获取 vipToken: params?.cookie?.vip_token || params?.vipToken || '', // 该参数不影响url获取 @@ -10,15 +20,27 @@ module.exports = (params, useAxios) => { version: 9541, pidversion: 3001, IsFreePart: params?.free_part ? 1 : 0, //是否返回试听部分(仅部分歌曲) + album_id: Number(params.album_id ?? 0), + ssa_flag: 'is_fromtrack', + version: 11709, + page_id: 151369488, + quality: quality || 128, + pid: 2, + cmd: 26, + ppage_id: '463467626,350369493,788954147', + cdnBackup: 1, + kcard: 0, + module: 'collection', }; return useAxios({ - url: '/v3/url', + url: '/v5/url', method: 'GET', params: dataMap, encryptType: 'android', headers: { 'x-router': 'tracker.kugou.com' }, encryptKey: true, + notSign: true, cookie: params?.cookie || {}, }); };