Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
新增cloudsearch接口 #893, mv 地址接口修改分辨率参数 #883, 修复新碟上架接口分页问题 #892
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Aug 23, 2020
1 parent 0de21f3 commit 047c3bb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
10 changes: 6 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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`

### 获取视频标签列表
说明 : 调用此接口 , 可获取视频标签列表
Expand Down
16 changes: 16 additions & 0 deletions module/cloudsearch.js
Original file line number Diff line number Diff line change
@@ -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,
})
}
2 changes: 1 addition & 1 deletion module/mv_url.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module.exports = (query, request) => {
const data = {
id: query.id,
r: query.res || 1080,
r: query.r || 1080,
}
return request(
'POST',
Expand Down
2 changes: 2 additions & 0 deletions module/top_album.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NeteaseCloudMusicApi",
"version": "3.38.0",
"version": "3.39.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

0 comments on commit 047c3bb

Please sign in to comment.