From 901bde6630c691d9d387fc5b2310715c3d0a374b Mon Sep 17 00:00:00 2001 From: binaryify Date: Sat, 19 Jan 2019 18:59:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=96=B0=E7=A2=9F=E4=B8=8A=E6=9E=B6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=9B=B4=E6=96=B0=E5=90=AC=E6=AD=8C=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=20#431,=E6=9B=B4=E6=96=B0=E6=90=9C=E7=B4=A2=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E6=8E=A5=E5=8F=A3=20#416?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 5 +++++ README.MD | 2 ++ docs/README.md | 4 +++- module/search_suggest.js | 5 +++-- package.json | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 9665773..a2d9d32 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,9 @@ # 更新日志 +### 3.2.0 | 2019.01.19 +- 增加获取首页新碟上架数据以及更新听歌排行 + +- 更新搜索建议接口 + ### 3.1.0 | 2019.01.06 - 修复评论接口返回 460 Cheating 的问题 diff --git a/README.MD b/README.MD index 95611d4..2299c81 100644 --- a/README.MD +++ b/README.MD @@ -109,6 +109,8 @@ 87. 新歌速递 88. 喜欢音乐列表(无序) 89. 收藏的 MV 列表 +90. 获取最新专辑 +91. 听歌打卡 ## 环境要求 diff --git a/docs/README.md b/docs/README.md index 92320b3..68083e2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -724,9 +724,11 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具 **必选参数 :** `keywords` : 关键词 +**可选参数 :** `type` : 如果传 'mobile' 则返回移动端数据 + **接口地址 :** `/search/suggest` -**调用例子 :** `/search/suggest?keywords= 海阔天空` +**调用例子 :** `/search/suggest?keywords= 海阔天空` `/search/suggest?keywords= 海阔天空&type=mobile` ### 搜索多重匹配 diff --git a/module/search_suggest.js b/module/search_suggest.js index 0ef55fd..ef53d9e 100644 --- a/module/search_suggest.js +++ b/module/search_suggest.js @@ -4,8 +4,9 @@ module.exports = (query, request) => { const data = { s: query.keywords || '' } + let type = query.type == 'mobile' ? 'keyword' : 'web' return request( - 'POST', `https://music.163.com/weapi/search/suggest/keyword`, data, - {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} + 'POST', `https://music.163.com/weapi/search/suggest/` + type, data, + { crypto: 'weapi', cookie: query.cookie, proxy: query.proxy } ) } \ No newline at end of file diff --git a/package.json b/package.json index 7af7f12..2db559e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.1.0", + "version": "3.2.0", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",