feat:歌曲红心数量,歌曲音质详情,本地歌曲文件匹配网易云歌曲信息

feat:本地歌曲文件匹配网易云歌曲信息
feat:歌曲音质详情
feat:歌曲红心数量
This commit is contained in:
5unV 2023-12-12 10:55:25 +08:00
parent ef7b1a935b
commit 737e226471
4 changed files with 121 additions and 0 deletions

View File

@ -288,6 +288,9 @@
270. 播客声音搜索
271. 播客声音排序
272. 播客列表详情
273. 本地歌曲文件匹配网易云歌曲信息
274. 歌曲音质详情
275. 歌曲红心数量
## 安装
@ -4512,6 +4515,58 @@ qrCodeStatus:20,detailReason:0 验证成功qrCodeStatus:21,detailReason:0 二
**调用例子:** `/summary/annual?year=2022`
### 本地歌曲文件匹配网易云歌曲信息
说明: 调用此接口可以为本地歌曲文件搜索匹配歌曲ID、专辑封面等信息
**必选参数:**
`title`: 文件的标题信息,是文件属性里的标题属性,并非文件名
`album`: 文件的专辑信息
`artist`: 文件的艺术家信息
`duration`: 文件的时长,单位为秒
`md5`: 文件的md5
**接口地址:** `/search/match`
**调用例子:** `/search/match?title=富士山下&album=&artist=陈奕迅&duration=259.21&md5=bd708d006912a09d827f02e754cf8e56`
### 歌曲音质详情
说明: 调用此接口获取歌曲各个音质的文件信息,与 `获取歌曲详情` 接口相比,多出 `高清环绕声``沉浸环绕声``超清母带`等音质的信息
**必选参数:**
`id`: 歌曲id
**接口地址:** `song/music/detail`
**调用例子:** `song/music/detail?id=2082700997`
返回字段说明 :
```
"br": 比特率Bit Rate,
"size": 文件大小,
"vd": Volume Delta,
"sr": 采样率Sample Rate
```
### 歌曲红心数量
说明: 调用此接口获取歌曲的红心用户数量
**必选参数:**
`id`: 歌曲id
**接口地址:** `/song/red/count`
**调用例子:** `/song/red/count?id=186016`
## 离线访问此文档
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问

28
module/search_match.js Normal file
View File

@ -0,0 +1,28 @@
// 本地歌曲匹配音乐信息
module.exports = (query, request) => {
let songs = [
{
title: query.title || '',
album: query.album || '',
artist: query.artist || '',
duration: query.duration || 0,
persistId: query.md5,
},
]
const data = {
songs: JSON.stringify(songs),
}
return request(
'POST',
`https://interface3.music.163.com/eapi/search/match/new`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
url: '/api/search/match/new',
realIP: query.realIP,
},
)
}

View File

@ -0,0 +1,19 @@
// 歌曲音质详情
module.exports = (query, request) => {
const data = {
songId: query.id,
}
return request(
'POST',
`https://interface3.music.163.com/eapi/song/music/detail/get`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
url: '/api/song/music/detail/get',
realIP: query.realIP,
},
)
}

19
module/song_red_count.js Normal file
View File

@ -0,0 +1,19 @@
// 歌曲红心数量
module.exports = (query, request) => {
const data = {
songId: query.id,
}
return request(
'POST',
`https://interface3.music.163.com/eapi/song/red/count`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
url: '/api/song/red/count',
realIP: query.realIP,
},
)
}