提交 047c3bb0 编写于 作者: B binaryify

新增`cloudsearch`接口 #893, `mv 地址`接口修改分辨率参数 #883, 修复新碟上架接口分页问题 #892

上级 0de21f3c
# 更新日志 # 更新日志
### 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 ### 3.38.0 | 2020.08.09
- 新增`歌曲楼层评论`,`歌手全部歌曲`接口 [#864](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/864) [#867](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/867) - 新增`歌曲楼层评论`,`歌手全部歌曲`接口 [#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) - 支持收藏VIP或付费歌曲到歌单 [#860](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/860)
......
...@@ -1101,9 +1101,9 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具 ...@@ -1101,9 +1101,9 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
`type`: 搜索类型;默认为 1 即单曲 , 取值意义 : 1: 单曲, 10: 专辑, 100: 歌手, 1000: `type`: 搜索类型;默认为 1 即单曲 , 取值意义 : 1: 单曲, 10: 专辑, 100: 歌手, 1000:
歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频, 1018:综合 歌单, 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) ![搜索音乐](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/%E6%90%9C%E7%B4%A2.png)
...@@ -2121,13 +2121,15 @@ MV 点赞转发评论数数据 ...@@ -2121,13 +2121,15 @@ MV 点赞转发评论数数据
说明 : 调用此接口 , 传入 mv id,可获取 mv 播放地址 说明 : 调用此接口 , 传入 mv id,可获取 mv 播放地址
**可选参数 :** `id`: mv id **必选参数 :** `id`: mv id
**可选参数 :** `r`: 分辨率,默认1080,可从 `/mv/detail` 接口获取分辨率列表
**接口地址 :** `/mv/url` **接口地址 :** `/mv/url`
**调用例子 :** **调用例子 :**
`/mv/url?id=5436712` `/mv/url?id=5436712` `/mv/url?id=10896407&r=1080`
### 获取视频标签列表 ### 获取视频标签列表
说明 : 调用此接口 , 可获取视频标签列表 说明 : 调用此接口 , 可获取视频标签列表
......
// 搜索
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,
})
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module.exports = (query, request) => { module.exports = (query, request) => {
const data = { const data = {
id: query.id, id: query.id,
r: query.res || 1080, r: query.r || 1080,
} }
return request( return request(
'POST', 'POST',
......
...@@ -10,6 +10,8 @@ module.exports = (query, request) => { ...@@ -10,6 +10,8 @@ module.exports = (query, request) => {
type: query.type || 'new', type: query.type || 'new',
year: query.year || date.getFullYear(), year: query.year || date.getFullYear(),
month: query.month || date.getMonth() + 1, month: query.month || date.getMonth() + 1,
total: false,
rcmd: false
} }
return request( return request(
'POST', 'POST',
......
{ {
"name": "NeteaseCloudMusicApi", "name": "NeteaseCloudMusicApi",
"version": "3.38.0", "version": "3.39.0",
"description": "网易云音乐 NodeJS 版 API", "description": "网易云音乐 NodeJS 版 API",
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册