@neteasecloudmusicapienhanced/api 4.29.20 → 4.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.MD CHANGED
@@ -6,11 +6,20 @@
6
6
 
7
7
  本项目为网易云音乐第三方 Node.js API,基于停更的原版 API 持续维护,支持丰富的音乐相关接口,适合自建服务、二次开发和多平台部署(如果原版诈尸, 我会及时同步 or 归档)。
8
8
 
9
+ > [!IMPORTANT]
10
+ >
11
+ > ## 注意
12
+ >
13
+ > - 本项目是一个高度去中心化的第三方 API,其维护都由社区志愿者使用`Pull Request`完成。
14
+ > - 使用本项目时请务必遵守相关法律法规,遵守`MIT`协议, 尊重网易云音乐的服务条款。
15
+ > - 原作者项目 [Binaryify/NeteaseCloudMusicApi](https://github.com/binaryify/NeteaseCloudMusicApi) 并非完全停止维护, 你可以在 [NeteaseCloudMusicApi 的 NPMJS 页面](https://www.npmjs.com/package/NeteaseCloudMusicApi) 查看最新版本信息。
16
+ > - 感谢尊重和理解!
17
+
9
18
  ## 快速开始
10
19
 
11
20
  ### 环境要求
12
21
 
13
- - Node.js 14 及以上
22
+ - Node.js 18 及以上
14
23
  - 推荐使用 pnpm 进行依赖管理
15
24
 
16
25
  ### 安装
@@ -51,31 +60,43 @@ set PORT=4000 && node app.js # Windows
51
60
 
52
61
  本项目支持通过 Docker 一键部署,无需手动安装 Node.js 或依赖。
53
62
 
54
- ### 1. 拉取镜像
63
+ > 注意: 在 docker 中运行的时候, 由于使用了 request 来发请求, 所以会检查几个 proxy 相关的环境变量(如下所列), 这些环境变量 会影响到 request 的代理, 详情请参考[request 的文档](https://github.com/request/request#proxies), 如果这些环境变量 指向的代理不可用, 那么就会造成错误, 所以在使用 docker 的时候一定要注意这些环境变量. 不过, 要是你在 query 中加上了 proxy 参数, 那么环境变量会被覆盖, 就会用你通过 proxy 参数提供的代理了.
55
64
 
56
- Docker Hub 拉取最新版本镜像:
65
+ request 相关的环境变量
57
66
 
58
- ```bash
67
+ 1. http_proxy
68
+ 2. https_proxy
69
+ 3. HTTP_PROXY
70
+ 4. HTTPS_PROXY
71
+ 5. no_proxy
72
+ 6. NO_PROXY
73
+
74
+ ```shell
59
75
  docker pull moefurina/ncm-api:latest
60
- ```
61
76
 
62
- 或指定版本(与 package.json 中版本号一致):
77
+ docker run -d -p 3000:3000 --name ncm-api moefurina/ncm-api:latest
63
78
 
64
- ```bash
65
- docker pull moefurina/ncm-api:4.29.0
66
79
 
67
- ```
80
+ // 或者
81
+ docker run -d -p 3000:3000 moefurina/ncm-api:latest
68
82
 
69
- ### 2. 运行容器
83
+ // 去掉或者设置相关的环境变量
70
84
 
71
- ```bash
72
- docker run -d \
73
- --name ncm-api \
74
- -p 3000:3000 \
75
- moefurina/ncm-api:latest
85
+ docker run -d -p 3000:3000 --name ncm-api -e http_proxy= -e https_proxy= -e no_proxy= -e HTTP_PROXY= -e HTTPS_PROXY= -e NO_PROXY= moefurina/ncm-api:latest
86
+
87
+ // 或者
88
+ docker run -d -p 3000:3000 -e http_proxy= -e https_proxy= -e no_proxy= -e HTTP_PROXY= -e HTTPS_PROXY= -e NO_PROXY= moefurina/ncm-api:latest
76
89
  ```
77
90
 
78
- 运行后访问 http://localhost:3000 即可使用 API。
91
+ > 以下是自行 build docker 镜像方式
92
+
93
+ ```shell
94
+ $ git clone https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced && cd api-enhanced
95
+
96
+ $ sudo docker build . -t ncm-api
97
+
98
+ $ sudo docker run -d -p 3000:3000 ncm-api
99
+ ```
79
100
 
80
101
  ## 3. 环境变量
81
102
 
@@ -162,6 +183,15 @@ pnpm test
162
183
 
163
184
  - 欢迎提交 PR、Issue 参与维护
164
185
 
186
+ ## 最近更新日志
187
+ ### 4.30.0 | 2026.02.06
188
+ - feat: 新增音乐人黑胶会员任务接口 `/musician/vip/tasks` (#95)
189
+ - feat: 自动构建: 添加Windows、Linux、macOS预编译二进制文件 (#88)
190
+ - fix: 修复模块未定义问题
191
+ - chore: 更新依赖项 (music-metadata: ^11.11.1 -> ^11.11.2, ansi-escapes: ^7.2.0 -> ^7.3.0, commander: ^14.0.2 -> ^14.0.3)
192
+ - chore: 更新GitHub Actions (checkout: v4 -> v6, setup-node: v4 -> v6, upload-artifact: v4 -> v6, download-artifact: v4 -> v7, github-script: v7 -> v8)
193
+ - refactor: 注释掉IP地址日志输出以提升隐私保护
194
+
165
195
  ### 致谢
166
196
 
167
197
  原作者 [Binaryify/NeteaseCloudMusicApi](https://github.com/binaryify/NeteaseCloudMusicApi) 项目为本项目基础 (该项目在`npmjs`网站上仍持续维护, 但 github 仓库已不再更新)
package/interface.d.ts CHANGED
@@ -1715,6 +1715,8 @@ export function nickname_check(
1715
1715
 
1716
1716
  export function musician_tasks_new(params: RequestBaseConfig): Promise<Response>
1717
1717
 
1718
+ export function musician_vip_tasks(params: RequestBaseConfig): Promise<Response>
1719
+
1718
1720
  export function playlist_update_playcount(
1719
1721
  params: {
1720
1722
  id?: number | string
@@ -0,0 +1,11 @@
1
+ // 获取音乐人任务
2
+
3
+ const createOption = require('../util/option.js')
4
+ module.exports = (query, request) => {
5
+ const data = {}
6
+ return request(
7
+ `/api/nmusician/workbench/special/right/vip/info`,
8
+ data,
9
+ createOption(query, 'eapi'),
10
+ )
11
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@neteasecloudmusicapienhanced/api",
3
- "version": "4.29.20",
4
- "description": "A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced)|| 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护",
3
+ "version": "4.30.0",
4
+ "description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced) || 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护",
5
5
  "scripts": {
6
6
  "dev": "nodemon app.js",
7
7
  "start": "node app.js",
@@ -9,9 +9,9 @@
9
9
  "lint": "eslint \"**/*.{js,ts}\"",
10
10
  "lint-fix": "eslint --fix \"**/*.{js,ts}\"",
11
11
  "prepare": "husky install",
12
- "pkgwin": "pkg . -t node18-win-x64 -C GZip -o bin/app --no-bytecode",
13
- "pkglinux": "pkg . -t node18-linux-x64 -C GZip -o bin/app --no-bytecode",
14
- "pkgmacos": "pkg . -t node18-macos-x64 -C GZip -o bin/app --no-bytecode"
12
+ "pkgwin": "pkg . -t node18-win-x64 -C GZip -o precompiled/app",
13
+ "pkglinux": "pkg . -t node18-linux-x64 -C GZip -o precompiled/app",
14
+ "pkgmacos": "pkg . -t node18-macos-x64 -C GZip -o precompiled/app"
15
15
  },
16
16
  "bin": "./app.js",
17
17
  "pkg": {
@@ -66,14 +66,14 @@
66
66
  "data"
67
67
  ],
68
68
  "dependencies": {
69
- "@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.1.3",
70
- "axios": "^1.13.2",
69
+ "@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.2",
70
+ "axios": "^1.13.5",
71
71
  "crypto-js": "^4.2.0",
72
- "dotenv": "^17.2.3",
72
+ "dotenv": "^17.2.4",
73
73
  "express": "^5.2.1",
74
74
  "express-fileupload": "^1.5.2",
75
75
  "md5": "^2.3.0",
76
- "music-metadata": "^11.10.3",
76
+ "music-metadata": "^11.12.0",
77
77
  "node-forge": "^1.3.3",
78
78
  "pac-proxy-agent": "^7.2.0",
79
79
  "qrcode": "^1.5.4",
@@ -88,22 +88,22 @@
88
88
  "@types/express": "^5.0.6",
89
89
  "@types/express-fileupload": "^1.5.1",
90
90
  "@types/mocha": "^10.0.10",
91
- "@types/node": "24.10.0",
92
- "@typescript-eslint/eslint-plugin": "8.46.2",
93
- "@typescript-eslint/parser": "8.46.3",
91
+ "@types/node": "25.0.9",
92
+ "@typescript-eslint/eslint-plugin": "8.46.3",
93
+ "@typescript-eslint/parser": "8.53.0",
94
94
  "eslint": "9.39.0",
95
95
  "eslint-config-prettier": "10.1.8",
96
96
  "eslint-plugin-html": "8.1.3",
97
- "eslint-plugin-prettier": "5.5.4",
97
+ "eslint-plugin-prettier": "5.5.5",
98
98
  "globals": "^16.5.0",
99
99
  "husky": "9.1.7",
100
100
  "intelli-espower-loader": "1.1.0",
101
- "lint-staged": "16.2.6",
101
+ "lint-staged": "16.2.7",
102
102
  "mocha": "11.7.5",
103
103
  "nodemon": "^3.1.11",
104
104
  "pkg": "^5.8.1",
105
105
  "power-assert": "1.6.1",
106
- "prettier": "3.6.2",
106
+ "prettier": "3.7.4",
107
107
  "typescript": "5.9.3"
108
108
  }
109
109
  }
package/public/api.html CHANGED
@@ -5,82 +5,148 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>API 调试界面</title>
7
7
  <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
8
14
  body {
9
- font-family: Arial, sans-serif;
10
- margin: 20px;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 100vh;
15
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
16
+ min-height: 100vh;
17
+ background: #f5f5f5;
18
+ padding: 20px;
14
19
  }
20
+
15
21
  .container {
16
- display: flex;
17
- flex-direction: column;
18
- flex-grow: 1;
22
+ max-width: 1200px;
23
+ margin: 0 auto;
24
+ background: white;
25
+ border-radius: 12px;
26
+ padding: 32px;
27
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
19
28
  }
29
+
30
+ h1 {
31
+ font-size: 24px;
32
+ font-weight: 600;
33
+ color: #333;
34
+ margin-bottom: 24px;
35
+ }
36
+
20
37
  form {
21
- display: flex;
22
- flex-direction: row;
23
- align-items: center;
24
- gap: 10px;
25
- margin-bottom: 10px;
38
+ display: flex;
39
+ flex-direction: column;
40
+ gap: 16px;
41
+ margin-bottom: 24px;
42
+ }
43
+
44
+ .form-row {
45
+ display: flex;
46
+ gap: 12px;
47
+ align-items: center;
48
+ }
49
+
50
+ label {
51
+ font-size: 14px;
52
+ font-weight: 500;
53
+ color: #555;
54
+ min-width: 80px;
55
+ }
56
+
57
+ input, select {
58
+ padding: 10px 14px;
59
+ border: 1px solid #ddd;
60
+ border-radius: 6px;
61
+ font-size: 14px;
62
+ flex: 1;
63
+ outline: none;
26
64
  }
27
- input, button {
28
- padding: 10px;
29
- box-sizing: border-box;
30
- flex: 1;
65
+
66
+ input:focus, select:focus {
67
+ border-color: #333;
31
68
  }
69
+
32
70
  button {
33
- background-color: #4CAF50;
34
- color: white;
35
- border: none;
36
- cursor: pointer;
71
+ background: #333;
72
+ color: white;
73
+ padding: 10px 24px;
74
+ border: none;
75
+ border-radius: 6px;
76
+ font-size: 14px;
77
+ font-weight: 500;
78
+ cursor: pointer;
79
+ transition: background 0.2s ease;
80
+ }
81
+
82
+ button:hover {
83
+ background: #555;
37
84
  }
85
+
38
86
  .data-result {
39
- display: flex;
40
- flex-direction: row;
41
- flex-grow: 1;
87
+ display: flex;
88
+ gap: 16px;
89
+ min-height: 400px;
42
90
  }
91
+
43
92
  .data-result > div {
44
- display: flex;
45
- flex-direction: column;
46
- flex-grow: 1;
47
- padding: 10px;
48
- box-sizing: border-box;
93
+ flex: 1;
94
+ display: flex;
95
+ flex-direction: column;
49
96
  }
97
+
50
98
  .data-result label {
51
- margin-bottom: 10px;
99
+ margin-bottom: 8px;
100
+ padding: 0;
52
101
  }
53
- #data, #result {
54
- height: 100%;
55
- box-sizing: border-box;
102
+
103
+ textarea {
104
+ flex: 1;
105
+ padding: 12px;
106
+ border: 1px solid #ddd;
107
+ border-radius: 6px;
108
+ font-family: 'Courier New', monospace;
109
+ font-size: 13px;
110
+ resize: vertical;
111
+ min-height: 350px;
112
+ outline: none;
56
113
  }
57
- #data {
58
- border-right: 1px solid #ccc;
114
+
115
+ textarea:focus {
116
+ border-color: #333;
59
117
  }
60
118
  </style>
61
119
  </head>
62
120
  <body>
63
121
  <div class="container">
122
+ <h1>API 调试界面</h1>
64
123
  <form onsubmit="event.preventDefault(); sendRequest();">
65
- <label for="uri">uri</label>
66
- <input type="text" id="uri" name="uri" value="/api/song/lyric/v1">
67
- <label for="crypto">crypto</label>
68
- <select id="crypto" name="crypto">
69
- <option value="weapi">weapi</option>
70
- <option value="eapi">eapi</option>
71
- <option value="api">api</option>
72
- <option value="linuxapi">linuxapi</option>
73
- <option value="" selected>(默认)</option>
74
- </select>
75
- <button type="submit">发送</button>
124
+ <div class="form-row">
125
+ <label for="uri">URI</label>
126
+ <input type="text" id="uri" name="uri" value="/api/song/lyric/v1">
127
+ </div>
128
+ <div class="form-row">
129
+ <label for="crypto">加密方式</label>
130
+ <select id="crypto" name="crypto">
131
+ <option value="weapi">weapi</option>
132
+ <option value="eapi">eapi</option>
133
+ <option value="api">api</option>
134
+ <option value="linuxapi">linuxapi</option>
135
+ <option value="" selected>(默认)</option>
136
+ </select>
137
+ </div>
138
+ <div class="form-row">
139
+ <label></label>
140
+ <button type="submit">发送请求</button>
141
+ </div>
76
142
  </form>
77
143
  <div class="data-result">
78
144
  <div>
79
- <label for="result">result</label>
80
- <textarea id="result" name="result"></textarea>
145
+ <label for="result">响应结果</label>
146
+ <textarea id="result" name="result" readonly></textarea>
81
147
  </div>
82
148
  <div>
83
- <label for="data">data</label>
149
+ <label for="data">请求数据</label>
84
150
  <textarea id="data" name="data">
85
151
  {
86
152
  "cp": false,
@@ -1,6 +1,5 @@
1
1
  'use strict'
2
2
  const WASM_BINARY_PLACEHOLDER = 'WASM_BINARY_PLACEHOLDER';
3
- const logger = require('../../util/logger.js')
4
3
  // See https://github.com/Distributive-Network/PythonMonkey/issues/266
5
4
  if (typeof globalThis.setInterval != 'function'){
6
5
  globalThis.setInterval = function pm$$setInterval(fn, timeout) {
@@ -1612,9 +1611,9 @@ function instantiateRuntime(){
1612
1611
 
1613
1612
  function GenerateFP(floatArray) {
1614
1613
  let PCMBuffer = Float32Array.from(floatArray)
1615
- logger.info('[afp] input samples n=', PCMBuffer.length)
1614
+ console.info('[afp] input samples n=', PCMBuffer.length)
1616
1615
  return instantiateRuntime().then((fpRuntime) => {
1617
- logger.info('[afp] begin fingerprinting')
1616
+ console.info('[afp] begin fingerprinting')
1618
1617
  let fp_vector = fpRuntime.ExtractQueryFP(PCMBuffer.buffer)
1619
1618
  let result_buf = new Uint8Array(fp_vector.size());
1620
1619
  for (let t = 0; t < fp_vector.size(); t++)