From 9e9c77541a50193293d97acd4ab3f266aa8ff34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lz=E5=B7=B2=E7=BB=8F=E6=98=AF=E6=9D=A1=E5=92=B8=E9=B1=BC?= =?UTF-8?q?=E4=BA=86?= Date: Sat, 6 Nov 2021 12:35:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=91=E9=80=81?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=8A=A8=E6=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.MD | 2 ++ docs/README.md | 9 +++++++++ module/send_event_text.js | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 module/send_event_text.js diff --git a/README.MD b/README.MD index d02beac944d..9ca4ba1b46f 100644 --- a/README.MD +++ b/README.MD @@ -344,6 +344,8 @@ banner({ type:0 }).then(res=>{ 222. 账号云豆数 223. 领取云豆 224. 获取 VIP 信息 +225. 音乐人签到 +226. 发送文本动态 ## 更新日志 diff --git a/docs/README.md b/docs/README.md index 240c4e4f8cd..5cdf5f369a9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -241,6 +241,7 @@ 223. 领取云豆 224. 获取 VIP 信息 225. 音乐人签到 +226. 发送文本动态 ## 安装 @@ -3507,6 +3508,14 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **接口地址 :** `/playlist/privacy` +### 发送文本动态 + +说明: 可以调用此接口发送动态。 + +**必选参数 :** `msg` : 要发送的动态内容 + +**接口地址 :** `/send/event/text` + ## 离线访问此文档 此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问 diff --git a/module/send_event_text.js b/module/send_event_text.js new file mode 100644 index 00000000000..0fe552f18d9 --- /dev/null +++ b/module/send_event_text.js @@ -0,0 +1,20 @@ +// 发送文本动态 + +module.exports = (query, request) => { + const data = { + msg: query.msg, + type: 'noresource', + } + return request( + 'POST', + `https://interface.music.163.com/eapi/share/friends/resource`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/share/friends/resource', + }, + ) +} From 793c276e4eee7a016de4e5245a88224797d38ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lz=E5=B7=B2=E7=BB=8F=E6=98=AF=E6=9D=A1=E5=92=B8=E9=B1=BC?= =?UTF-8?q?=E4=BA=86?= Date: Sat, 6 Nov 2021 21:38:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=AD=8C=E6=9B=B2=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?url=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.MD | 1 + docs/README.md | 11 +++++++++++ module/song_download_url.js | 20 ++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 module/song_download_url.js diff --git a/README.MD b/README.MD index 9ca4ba1b46f..4c91fb59bd5 100644 --- a/README.MD +++ b/README.MD @@ -346,6 +346,7 @@ banner({ type:0 }).then(res=>{ 224. 获取 VIP 信息 225. 音乐人签到 226. 发送文本动态 +227. 获取客户端歌曲下载 url ## 更新日志 diff --git a/docs/README.md b/docs/README.md index 5cdf5f369a9..795ef68e53e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -242,6 +242,7 @@ 224. 获取 VIP 信息 225. 音乐人签到 226. 发送文本动态 +227. 获取客户端歌曲下载 url ## 安装 @@ -3516,6 +3517,16 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **接口地址 :** `/send/event/text` +### 获取客户端歌曲下载 url + +说明 : 使用 `/song/url` 接口获取的是歌曲试听 url, 但存在部分歌曲在非 VIP 账号上可以下载无损音质而不能试听无损音质, 使用此接口可使非 VIP 账号获取这些歌曲的无损音频 + +**必选参数 :** `id` : 音乐 id (仅支持单首歌曲) + +**可选参数 :** `br` : 码率, 默认设置了 999000 即最大码率, 如果要 320k 则可设置为 320000, 其他类推 + +**接口地址 :** `/song/download/url` + ## 离线访问此文档 此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问 diff --git a/module/song_download_url.js b/module/song_download_url.js new file mode 100644 index 00000000000..73eccc9f41d --- /dev/null +++ b/module/song_download_url.js @@ -0,0 +1,20 @@ +// 获取客户端歌曲下载链接 + +module.exports = (query, request) => { + const data = { + id: query.id, + br: parseInt(query.br || 999000), + } + return request( + 'POST', + `https://interface.music.163.com/eapi/song/enhance/download/url`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/song/enhance/download/url', + }, + ) +}