mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
搜索接口支持搜索声音
This commit is contained in:
parent
2752ad5270
commit
ce6e29a7ec
@ -1,4 +1,7 @@
|
||||
# 更新日志
|
||||
### 4.5.5 | 2022.02.09
|
||||
- 搜索接口支持搜索声音
|
||||
|
||||
### 4.5.4 | 2022.02.09
|
||||
- 修复云盘上传无法获取到文件的问题
|
||||
|
||||
|
@ -1383,7 +1383,7 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
|
||||
: 如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
|
||||
|
||||
`type`: 搜索类型;默认为 1 即单曲 , 取值意义 : 1: 单曲, 10: 专辑, 100: 歌手, 1000:
|
||||
歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频, 1018:综合
|
||||
歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频, 1018:综合, 2000:声音(搜索声音返回字段格式会不一样)
|
||||
|
||||
**接口地址 :** `/search` 或者 `/cloudsearch`(更全)
|
||||
|
||||
|
@ -1,6 +1,20 @@
|
||||
// 搜索
|
||||
|
||||
module.exports = (query, request) => {
|
||||
if (query.type && query.type == '2000') {
|
||||
const data = {
|
||||
keyword: query.keywords,
|
||||
scene: 'normal',
|
||||
limit: query.limit || 30,
|
||||
offset: query.offset || 0,
|
||||
}
|
||||
return request('POST', `https://music.163.com/api/search/voice/get`, data, {
|
||||
crypto: 'weapi',
|
||||
cookie: query.cookie,
|
||||
proxy: query.proxy,
|
||||
realIP: query.realIP,
|
||||
})
|
||||
}
|
||||
const data = {
|
||||
s: query.keywords,
|
||||
type: query.type || 1, // 1: 单曲, 10: 专辑, 100: 歌手, 1000: 歌单, 1002: 用户, 1004: MV, 1006: 歌词, 1009: 电台, 1014: 视频
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "NeteaseCloudMusicApi",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "网易云音乐 NodeJS 版 API",
|
||||
"scripts": {
|
||||
"start": "node app.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user