mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-04 00:02:08 +08:00
新增获取客户端歌曲下载url接口
This commit is contained in:
parent
9e9c77541a
commit
793c276e4e
@ -346,6 +346,7 @@ banner({ type:0 }).then(res=>{
|
|||||||
224. 获取 VIP 信息
|
224. 获取 VIP 信息
|
||||||
225. 音乐人签到
|
225. 音乐人签到
|
||||||
226. 发送文本动态
|
226. 发送文本动态
|
||||||
|
227. 获取客户端歌曲下载 url
|
||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
|
@ -242,6 +242,7 @@
|
|||||||
224. 获取 VIP 信息
|
224. 获取 VIP 信息
|
||||||
225. 音乐人签到
|
225. 音乐人签到
|
||||||
226. 发送文本动态
|
226. 发送文本动态
|
||||||
|
227. 获取客户端歌曲下载 url
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
@ -3516,6 +3517,16 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
|
|||||||
|
|
||||||
**接口地址 :** `/send/event/text`
|
**接口地址 :** `/send/event/text`
|
||||||
|
|
||||||
|
### 获取客户端歌曲下载 url
|
||||||
|
|
||||||
|
说明 : 使用 `/song/url` 接口获取的是歌曲试听 url, 但存在部分歌曲在非 VIP 账号上可以下载无损音质而不能试听无损音质, 使用此接口可使非 VIP 账号获取这些歌曲的无损音频
|
||||||
|
|
||||||
|
**必选参数 :** `id` : 音乐 id (仅支持单首歌曲)
|
||||||
|
|
||||||
|
**可选参数 :** `br` : 码率, 默认设置了 999000 即最大码率, 如果要 320k 则可设置为 320000, 其他类推
|
||||||
|
|
||||||
|
**接口地址 :** `/song/download/url`
|
||||||
|
|
||||||
## 离线访问此文档
|
## 离线访问此文档
|
||||||
|
|
||||||
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
||||||
|
20
module/song_download_url.js
Normal file
20
module/song_download_url.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// 获取客户端歌曲下载链接
|
||||||
|
|
||||||
|
module.exports = (query, request) => {
|
||||||
|
const data = {
|
||||||
|
id: query.id,
|
||||||
|
br: parseInt(query.br || 999000),
|
||||||
|
}
|
||||||
|
return request(
|
||||||
|
'POST',
|
||||||
|
`https://interface.music.163.com/eapi/song/enhance/download/url`,
|
||||||
|
data,
|
||||||
|
{
|
||||||
|
crypto: 'eapi',
|
||||||
|
cookie: query.cookie,
|
||||||
|
proxy: query.proxy,
|
||||||
|
realIP: query.realIP,
|
||||||
|
url: '/api/song/enhance/download/url',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user