diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c0361edebcf73826106d6762799fa1e105407b25..0cc8a06f515e1d1b23edd20066cd40ed5bfc648b 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,9 @@ # 更新日志 +### 3.39.0 | 2020.08.23 +- 新增`cloudsearch`接口[#893](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/893) +- `mv 地址`接口修改分辨率参数 [#883](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/883) +- 修复新碟上架接口分页问题 [#892](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/892) + ### 3.38.0 | 2020.08.09 - 新增`歌曲楼层评论`,`歌手全部歌曲`接口 [#864](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/864) [#867](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/867) - 支持收藏VIP或付费歌曲到歌单 [#860](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/860) diff --git a/docs/README.md b/docs/README.md index e96492e8ab61376beb1153a9bb7b2741cbb56e1e..69d1742327dfe9af4d980b5cf2cfc8ee0aa20149 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1101,9 +1101,9 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具 `type`: 搜索类型;默认为 1 即单曲 , 取值意义 : 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频, 1018:综合 -**接口地址 :** `/search` +**接口地址 :** `/search` 或者 `/cloudsearch`(更全) -**调用例子 :** `/search?keywords= 海阔天空` +**调用例子 :** `/search?keywords= 海阔天空` `/cloudsearch?keywords= 海阔天空` 返回数据如下图 : ![搜索音乐](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/%E6%90%9C%E7%B4%A2.png) @@ -2121,13 +2121,15 @@ MV 点赞转发评论数数据 说明 : 调用此接口 , 传入 mv id,可获取 mv 播放地址 -**可选参数 :** `id`: mv id +**必选参数 :** `id`: mv id + +**可选参数 :** `r`: 分辨率,默认1080,可从 `/mv/detail` 接口获取分辨率列表 **接口地址 :** `/mv/url` **调用例子 :** -`/mv/url?id=5436712` +`/mv/url?id=5436712` `/mv/url?id=10896407&r=1080` ### 获取视频标签列表 说明 : 调用此接口 , 可获取视频标签列表 diff --git a/module/cloudsearch.js b/module/cloudsearch.js new file mode 100644 index 0000000000000000000000000000000000000000..82fca370a7017ad3b8e8c448741d6feb761746ae --- /dev/null +++ b/module/cloudsearch.js @@ -0,0 +1,16 @@ +// 搜索 + +module.exports = (query, request) => { + const data = { + s: query.keywords, + type: query.type || 1, // 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频 + limit: query.limit || 30, + offset: query.offset || 0, + } + return request('POST', `https://music.163.com/weapi/cloudsearch/get/web`, data, { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }) +} diff --git a/module/mv_url.js b/module/mv_url.js index b8e778394b154f672a136648093e23a3b9454827..3a0faddee8eaff7d65d2dfb341f80cc29f8642d5 100644 --- a/module/mv_url.js +++ b/module/mv_url.js @@ -3,7 +3,7 @@ module.exports = (query, request) => { const data = { id: query.id, - r: query.res || 1080, + r: query.r || 1080, } return request( 'POST', diff --git a/module/top_album.js b/module/top_album.js index f467bb814083ddbba2b298c09a95703124cbf983..960e7d38516f452d637bc1b5bc9d6de3cb323ae4 100644 --- a/module/top_album.js +++ b/module/top_album.js @@ -10,6 +10,8 @@ module.exports = (query, request) => { type: query.type || 'new', year: query.year || date.getFullYear(), month: query.month || date.getMonth() + 1, + total: false, + rcmd: false } return request( 'POST', diff --git a/package.json b/package.json index fe9e15c7b259740945fbd87a8783f1902235e1ea..2a1bdae9416d56041949be2d3032aa8d5f38e7eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.38.0", + "version": "3.39.0", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",