From b9e3b8f0165c442a62ef8fdd03f64441e4c7102e Mon Sep 17 00:00:00 2001 From: kengwang Date: Fri, 2 Sep 2022 12:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20API:=20=E6=AD=8C=E6=9B=B2?= =?UTF-8?q?=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', + }, + ) +}