From b9e3b8f0165c442a62ef8fdd03f64441e4c7102e Mon Sep 17 00:00:00 2001 From: kengwang Date: Fri, 2 Sep 2022 12:29:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20API:=20=E6=AD=8C?= =?UTF-8?q?=E6=9B=B2=E7=99=BE=E7=A7=91=E7=AE=80=E8=A6=81=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 有点无用的 API --- docs/README.md | 13 +++++++++++++ module/song_wiki_summary.js | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 module/song_wiki_summary.js diff --git a/docs/README.md b/docs/README.md index 55c4b06..b9554b5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3877,6 +3877,19 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **调用例子 :** `/vip/timemachine` `/vip/timemachine?startTime=1638288000000&endTime=1640966399999&limit=10`(2021年12月) `/vip/timemachine?startTime=1609430400&endTime=1640966399999&limit=60`(2021年) +### 音乐百科 - 简要信息 + +说明: 调用此接口可以获取歌曲的音乐百科简要信息 + +由于此接口返回内容过于复杂, 请按需取用 + +**接口地址:** `/song/wiki/about` + +**必选参数:** `id`: 歌曲 ID + +**调用例子:** `/song/wiki/about?id=1958384591` + + ## 离线访问此文档 diff --git a/module/song_wiki_summary.js b/module/song_wiki_summary.js new file mode 100644 index 0000000..5faa5bb --- /dev/null +++ b/module/song_wiki_summary.js @@ -0,0 +1,19 @@ +// 音乐百科基础信息 +const crypto = require('crypto') +module.exports = (query, request) => { + const data = { + songId: query.id + } + return request( + 'POST', + `https://interface3.music.163.com/eapi/music/wiki/home/song/get`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/song/play/about/block/page', + }, + ) +} From be156c5d22907cd2c007bf0c56ac21bf351d3750 Mon Sep 17 00:00:00 2001 From: kengwang Date: Fri, 2 Sep 2022 13:48:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20API:=20=E4=B9=90?= =?UTF-8?q?=E8=B0=B1=E7=9B=B8=E5=85=B3=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增: * 获取乐谱列表 * 获取乐谱内容 !!! 请注意, 乐谱内容的 id 为 乐谱 ID, 请不要提交错误 --- docs/README.md | 20 ++++++++++++++++++++ module/sheet_list.js | 20 ++++++++++++++++++++ module/sheet_preview.js | 19 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 module/sheet_list.js create mode 100644 module/sheet_preview.js diff --git a/docs/README.md b/docs/README.md index b9554b5..68c5d8d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3889,6 +3889,26 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **调用例子:** `/song/wiki/about?id=1958384591` +### 乐谱列表 + +说明: 调用此接口可以获取歌曲的乐谱列表 + +**接口地址:** `/sheet/list` + +**必选参数:** `id`: 歌曲 ID + +**调用例子:** `/sheet/list?id=1815684465` + +### 乐谱内容 + +说明: 调用此接口获取乐谱的内容 + +**接口地址:** `/sheet/preview` + +**必选参数:** `id`: **乐谱** ID + +**调用例子:** `/sheet/list?id=245206` + ## 离线访问此文档 diff --git a/module/sheet_list.js b/module/sheet_list.js new file mode 100644 index 0000000..014e8a6 --- /dev/null +++ b/module/sheet_list.js @@ -0,0 +1,20 @@ +// 乐谱列表 +const crypto = require('crypto') +module.exports = (query, request) => { + const data = { + id: query.id, + abTest: query.ab || 'b' + } + return request( + 'POST', + `https://interface3.music.163.com/eapi/music/sheet/list/v1`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/music/sheet/list/v1', + }, + ) +} diff --git a/module/sheet_preview.js b/module/sheet_preview.js new file mode 100644 index 0000000..905562c --- /dev/null +++ b/module/sheet_preview.js @@ -0,0 +1,19 @@ +// 乐谱预览 +const crypto = require('crypto') +module.exports = (query, request) => { + const data = { + id: query.id, + } + return request( + 'POST', + `https://interface3.music.163.com/eapi//music/sheet/preview/info?id=${query.id}`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api//music/sheet/preview/info',// 我没写错! 他们就是这么请求的! + }, + ) +}