From 912998b212a5c6b4f8517f15ff19f7cb387a7326 Mon Sep 17 00:00:00 2001 From: Kengwang Date: Sat, 7 Jan 2023 22:07:58 +0800 Subject: [PATCH] =?UTF-8?q?[feat]:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=80=90=E5=AD=97=E6=AD=8C=E8=AF=8D=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 15 +++++++++++++++ interface.d.ts | 4 ++++ module/lyric_new.js | 28 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 module/lyric_new.js diff --git a/docs/README.md b/docs/README.md index ae2ab62..1aafe1b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1625,6 +1625,21 @@ tags: 歌单标签 返回数据如下图 : ![获取歌词](https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/%E6%AD%8C%E8%AF%8D.png) +### 获取逐字歌词 + +说明 : 此接口的 `yrc` 字段即为逐字歌词 (可能有歌曲不包含逐字歌词) + + +**必选参数 :** `id`: 音乐 id + +**接口地址 :** `/lyric_new` + +**调用例子 :** `/lyric_new?id=1824020871` + + +相关讨论可见: [Issue](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1667) + + ### 新歌速递 说明 : 调用此接口 , 可获取新歌速递 diff --git a/interface.d.ts b/interface.d.ts index e76d380..42d97d6 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -712,6 +712,10 @@ export function lyric( params: { id: string | number } & RequestBaseConfig, ): Promise +export function lyric_new( + params: { id: string | number } & RequestBaseConfig, +): Promise + export function msg_comments( params: { uid: string | number diff --git a/module/lyric_new.js b/module/lyric_new.js new file mode 100644 index 0000000..da9bd6b --- /dev/null +++ b/module/lyric_new.js @@ -0,0 +1,28 @@ +// 新版歌词 - 包含逐字歌词 + +module.exports = (query, request) => { + const data = { + id: query.id, + cp: false, + tv: 0, + lv: 0, + rv: 0, + kv: 0, + yv: 0, + ytv: 0, + yrv: 0 + } + return request( + 'POST', + `https://interface3.music.163.com/eapi/song/lyric/v1`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/song/lyric/v1' + }, + ) + } + \ No newline at end of file