diff --git a/docs/README.md b/docs/README.md index 1171ab6..96ea8d2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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, 可离线访问 diff --git a/module/search_match.js b/module/search_match.js new file mode 100644 index 0000000..b8adf10 --- /dev/null +++ b/module/search_match.js @@ -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, + }, + ) +} diff --git a/module/song_music_detail.js b/module/song_music_detail.js new file mode 100644 index 0000000..f9eba04 --- /dev/null +++ b/module/song_music_detail.js @@ -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, + }, + ) +} diff --git a/module/song_red_count.js b/module/song_red_count.js new file mode 100644 index 0000000..bde0c30 --- /dev/null +++ b/module/song_red_count.js @@ -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, + }, + ) +}