Compare commits
14 Commits
bc1181c59d
...
bac875d181
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bac875d181 | ||
| a9332af453 | |||
| cffe68d9ff | |||
| 75ec2de66f | |||
| 0bd023c188 | |||
| 2c82c9b7be | |||
|
|
1320e5780b | ||
|
|
bde1f0864b | ||
|
|
e891287f1a | ||
| 29ef4f68c2 | |||
| ee25eb17a6 | |||
| 31d2ec9225 | |||
| b45bdd411f | |||
| c14b06f6c3 |
11
.github/workflows/issue-manage.yml
vendored
@ -19,15 +19,12 @@ jobs:
|
||||
with:
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
👋 感谢您提交issue!
|
||||
## 快速链接
|
||||
|
||||
我们已经收到您的反馈,维护者会尽快查看并回复。
|
||||
在我们处理您的问题之前,您可以先查看以下资源:
|
||||
|
||||
由于二开作者是高中生, 只能在非工作日处理issue, 请耐心等待。
|
||||
|
||||
在等待回复期间,您可以:
|
||||
- 📖 查看[项目文档](https://neteasecloudmusicapienhanced.js.org)
|
||||
- 💬 加入[QQ交流群](https://qm.qq.com/q/TpeP9Uv2yk) 进行实时讨论
|
||||
- 💬 加入[QQ交流群](https://qm.qq.com/q/TpeP9Uv2yk)
|
||||
- 🔍 搜索[现有issues](https://github.com/neteasecloudmusicapienhanced/api-enhanced/issues) 看是否有类似问题
|
||||
|
||||
handle-help-wanted:
|
||||
@ -54,8 +51,6 @@ jobs:
|
||||
|
||||
如果以上资源无法解决您的问题,请提供更多详细信息,我们会尽快为您解答!
|
||||
|
||||
由于二开作者是高中生, 只能在非工作日处理issue, 请耐心等待。
|
||||
|
||||
stale-issues:
|
||||
if: github.event.action == 'opened'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 12
|
||||
- 22
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
# 更新日志
|
||||
### 4.30.2 | 2026.02.22
|
||||
- feat(cloud): 添加云盘上传模式选择功能并优化上传配置 (#116)
|
||||
- refactor: Refactor random Chinese IP generator (#110)
|
||||
- fix(server): Correctly inject client IP into request parameters (#108)
|
||||
- refactor(ui): More elegant display of URL and debug buttons (#109)
|
||||
- feat: 添加评论统计数据 (#122)
|
||||
|
||||
### 4.30.1 | 2026.02.11
|
||||
- feat: Add user playlist endpoints & domain overrides (#105)
|
||||
|
||||
48
README.MD
@ -1,10 +1,38 @@
|
||||
# 网易云音乐 API Enhanced
|
||||
<p align="center">
|
||||
<img src="./public/docs/netease.png" alt="网易云音乐 API Enhanced Logo" width="120" height="120" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">NeteaseCloudMusicAPI Enhanced</h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/@neteasecloudmusicapienhanced/api">
|
||||
<img src="https://img.shields.io/npm/v/@neteasecloudmusicapienhanced/api?style=flat-square" alt="NPM Version" />
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/@neteasecloudmusicapienhanced/api">
|
||||
<img src="https://img.shields.io/npm/dm/@neteasecloudmusicapienhanced/api?style=flat-square" alt="NPM Downloads" />
|
||||
</a>
|
||||
<a href="https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced">
|
||||
<img src="https://img.shields.io/github/license/NeteaseCloudMusicApiEnhanced/api-enhanced?style=flat-square" alt="License" />
|
||||
</a>
|
||||
<a href="https://nodejs.org/">
|
||||
<img src="https://img.shields.io/node/v/@neteasecloudmusicapienhanced/api?style=flat-square" alt="Node Version" />
|
||||
</a>
|
||||
<a href="https://hub.docker.com/r/moefurina/ncm-api">
|
||||
<img src="https://img.shields.io/docker/v/moefurina/ncm-api?style=flat-square" alt="Docker Version" />
|
||||
</a>
|
||||
<a href="https://hub.docker.com/r/moefurina/ncm-api">
|
||||
<img src="https://img.shields.io/docker/pulls/moefurina/ncm-api?style=flat-square" alt="Docker Pulls" />
|
||||
</a>
|
||||
<a href="https://www.typescriptlang.org/">
|
||||
<img src="https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square&logo=typescript" alt="TypeScript" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 项目简介
|
||||
|
||||
本项目为网易云音乐第三方 Node.js API,基于停更的原版 API 持续维护,支持丰富的音乐相关接口,适合自建服务、二次开发和多平台部署(如果原版诈尸, 我会及时同步 or 归档)。
|
||||
网易云音乐第三方 Node.js API, 支持丰富的音乐相关接口,适合自建服务、二次开发和多平台部署(如果原版诈尸, 我会及时同步 or 归档)。
|
||||
|
||||
> [!IMPORTANT]
|
||||
>
|
||||
@ -183,15 +211,6 @@ pnpm test
|
||||
|
||||
- 欢迎提交 PR、Issue 参与维护
|
||||
|
||||
## 最近更新日志
|
||||
### 4.30.0 | 2026.02.06
|
||||
- feat: 新增音乐人黑胶会员任务接口 `/musician/vip/tasks` (#95)
|
||||
- feat: 自动构建: 添加Windows、Linux、macOS预编译二进制文件 (#88)
|
||||
- fix: 修复模块未定义问题
|
||||
- chore: 更新依赖项 (music-metadata: ^11.11.1 -> ^11.11.2, ansi-escapes: ^7.2.0 -> ^7.3.0, commander: ^14.0.2 -> ^14.0.3)
|
||||
- chore: 更新GitHub Actions (checkout: v4 -> v6, setup-node: v4 -> v6, upload-artifact: v4 -> v6, download-artifact: v4 -> v7, github-script: v7 -> v8)
|
||||
- refactor: 注释掉IP地址日志输出以提升隐私保护
|
||||
|
||||
### 致谢
|
||||
|
||||
原作者 [Binaryify/NeteaseCloudMusicApi](https://github.com/binaryify/NeteaseCloudMusicApi) 项目为本项目基础 (该项目在`npmjs`网站上仍持续维护, 但 github 仓库已不再更新)
|
||||
@ -213,6 +232,7 @@ pnpm test
|
||||
| Java | [JackuXL](https://github.com/JackuXL) | [NeteaseCloudMusicApi-SDK](https://github.com/JackuXL/NeteaseCloudMusicApi-SDK) | 第三方 |
|
||||
| Java | [1015770492](https://github.com/1015770492) | https://github.com/1015770492/yumbo-music-utils | 第三方 |
|
||||
| Python | [盧瞳](https://github.com/2061360308) | [NeteaseCloudMusic_PythonSDK](https://github.com/2061360308/NeteaseCloudMusic_PythonSDK) | 第三方 |
|
||||
| Swift | [Lincb522](https://github.com/Lincb522) | [NeteaseCloudMusicApi-Swift](https://github.com/Lincb522/NeteaseCloudMusicAPI-Swift) | 第三方 |
|
||||
|
||||
|
||||
### 依赖此项目的优秀开源项目
|
||||
@ -221,6 +241,10 @@ pnpm test
|
||||
|
||||
- [qier2222/YesPlayMusic](https://github.com/qier222/YesPlayMusic)
|
||||
|
||||
- [MaigoLabs/amaoke.app](https://github.com/MaigoLabs/amaoke.app)
|
||||
|
||||
- [Yueby/music-together](https://github.com/Yueby/music-together)
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](https://github.com/MoeFurina/NeteaseCloudMusicApiEnhanced/blob/main/LICENSE)
|
||||
|
||||
30
module/comment_info_list.js
Normal file
@ -0,0 +1,30 @@
|
||||
// 评论统计数据
|
||||
// type: 0=歌曲 1=MV 2=歌单 3=专辑 4=电台节目 5=视频 6=动态 7=电台
|
||||
// ids: 资源 ID 列表,多个用逗号分隔,如 "123,456"
|
||||
const { resourceTypeMap } = require('../util/config.json')
|
||||
const createOption = require('../util/option.js')
|
||||
|
||||
// 从 resourceTypeMap 的前缀值中提取网易云内部资源类型编号
|
||||
// 例如 "R_SO_4_" -> "4", "A_DR_14_" -> "14"
|
||||
const resourceTypeIdMap = Object.fromEntries(
|
||||
Object.entries(resourceTypeMap).map(([key, prefix]) => [
|
||||
key,
|
||||
prefix.replace(/_$/, '').split('_').pop(),
|
||||
]),
|
||||
)
|
||||
|
||||
module.exports = (query, request) => {
|
||||
const ids = String(query.ids || query.id || '')
|
||||
.split(',')
|
||||
.map((id) => id.trim())
|
||||
.filter(Boolean)
|
||||
|
||||
return request(
|
||||
`/api/resource/commentInfo/list`,
|
||||
{
|
||||
resourceType: resourceTypeIdMap[String(query.type || 0)],
|
||||
resourceIds: JSON.stringify(ids),
|
||||
},
|
||||
createOption(query, 'weapi'),
|
||||
)
|
||||
}
|
||||
@ -1,77 +1,5 @@
|
||||
// GD音乐台get(适配SPlayer的UNM-Server)
|
||||
// 感谢来自GD Studio的开发API
|
||||
// https://music.gdstudio.xyz/
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
// 夹带私货的东西就不要放在这里了
|
||||
|
||||
module.exports = async (query, request) => {
|
||||
try {
|
||||
const { id, br = '320' } = query
|
||||
if (!id) {
|
||||
return {
|
||||
status: 400,
|
||||
body: {
|
||||
code: 400,
|
||||
message: '缺少必要参数 id',
|
||||
data: [],
|
||||
},
|
||||
}
|
||||
}
|
||||
const validBR = ['128', '192', '320', '740', '999']
|
||||
// const covertBR = ['128000', '192000', '320000','740000', '999000']
|
||||
if (!validBR.includes(br)) {
|
||||
return {
|
||||
status: 400,
|
||||
body: {
|
||||
code: 400,
|
||||
message: '无效音质参数',
|
||||
allowed_values: validBR,
|
||||
data: [],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const apiUrl = new URL('https://music-api.gdstudio.xyz/api.php')
|
||||
apiUrl.searchParams.append('types', 'url')
|
||||
apiUrl.searchParams.append('id', id)
|
||||
apiUrl.searchParams.append('br', br)
|
||||
|
||||
const response = await fetch(apiUrl.toString())
|
||||
if (!response.ok) throw new Error(`API 响应状态: ${response.status}`)
|
||||
const result = await response.json()
|
||||
|
||||
// 代理逻辑
|
||||
const useProxy = process.env.ENABLE_PROXY || false
|
||||
const proxy = process.env.PROXY_URL
|
||||
if (useProxy && result.url && result.url.includes('kuwo')) {
|
||||
result.proxyUrl = proxy + result.url.replace(/^http:\/\//, 'http/')
|
||||
}
|
||||
|
||||
return {
|
||||
status: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
message: '请求成功',
|
||||
data: {
|
||||
id,
|
||||
br,
|
||||
url: result.url,
|
||||
...(proxy && result.proxyUrl ? { proxyUrl: result.proxyUrl } : {}),
|
||||
},
|
||||
},
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error in song_url_ncmget:', error)
|
||||
return {
|
||||
status: 500,
|
||||
body: {
|
||||
code: 500,
|
||||
message: '服务器处理请求失败',
|
||||
...(process.env.NODE_ENV === 'development'
|
||||
? { error: error.message }
|
||||
: {}),
|
||||
data: [],
|
||||
},
|
||||
}
|
||||
}
|
||||
return { status: 200, body: { code: 200, data: [] } }
|
||||
}
|
||||
|
||||
24
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@neteasecloudmusicapienhanced/api",
|
||||
"version": "4.30.1",
|
||||
"version": "4.30.2",
|
||||
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced) || 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护",
|
||||
"scripts": {
|
||||
"dev": "nodemon app.js",
|
||||
@ -65,13 +65,13 @@
|
||||
"data"
|
||||
],
|
||||
"dependencies": {
|
||||
"@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.2",
|
||||
"@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.3",
|
||||
"axios": "^1.13.5",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^17.2.4",
|
||||
"dotenv": "^17.3.1",
|
||||
"express": "^5.2.1",
|
||||
"express-fileupload": "^1.5.2",
|
||||
"music-metadata": "^11.12.0",
|
||||
"music-metadata": "^11.12.1",
|
||||
"node-forge": "^1.3.3",
|
||||
"pac-proxy-agent": "^7.2.0",
|
||||
"qrcode": "^1.5.4",
|
||||
@ -82,26 +82,26 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.3.3",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@eslint/js": "^9.39.3",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/express-fileupload": "^1.5.1",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/node": "25.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.3",
|
||||
"@typescript-eslint/parser": "^8.53.0",
|
||||
"eslint": "^9.39.0",
|
||||
"@types/node": "25.3.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
||||
"@typescript-eslint/parser": "^8.56.0",
|
||||
"eslint": "^9.39.3",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-html": "^8.1.3",
|
||||
"eslint-plugin-html": "^8.1.4",
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"globals": "^16.5.0",
|
||||
"husky": "^9.1.7",
|
||||
"intelli-espower-loader": "^1.1.0",
|
||||
"lint-staged": "^16.2.7",
|
||||
"mocha": "^11.7.5",
|
||||
"nodemon": "^3.1.11",
|
||||
"nodemon": "^3.1.14",
|
||||
"pkg": "^5.8.1",
|
||||
"power-assert": "^1.6.1",
|
||||
"prettier": "^3.7.4",
|
||||
"prettier": "^3.8.1",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
506
pnpm-lock.yaml
generated
@ -1686,6 +1686,62 @@ tags: 歌单标签
|
||||
|
||||
**调用例子 :** `/comment/video?id=89ADDE33C0AAE8EC14B99F6750DB954D`
|
||||
|
||||
### 评论统计数据
|
||||
|
||||
说明 : 调用此接口 , 传入资源类型和资源 id 列表 , 可批量获取对应资源的评论统计数据 ( 不需要登录 )
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
`type`: 数字 , 资源类型 , 对应以下类型
|
||||
|
||||
```
|
||||
0: 歌曲
|
||||
|
||||
1: mv
|
||||
|
||||
2: 歌单
|
||||
|
||||
3: 专辑
|
||||
|
||||
4: 电台节目
|
||||
|
||||
5: 视频
|
||||
|
||||
6: 动态
|
||||
|
||||
7: 电台
|
||||
```
|
||||
|
||||
`ids`: 资源 id 列表 , 多个 id 用逗号分隔 , 如 `186016,347230`
|
||||
|
||||
**接口地址 :** `/comment/info/list`
|
||||
|
||||
**调用例子 :** `/comment/info/list?type=0&ids=186016,347230`
|
||||
|
||||
**返回数据 :**
|
||||
|
||||
```json
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"latestLikedUsers": null,
|
||||
"liked": false,
|
||||
"comments": null,
|
||||
"resourceType": 4,
|
||||
"resourceId": 186016,
|
||||
"commentUpgraded": false,
|
||||
"musicianSaidCount": 0,
|
||||
"commentCountDesc": "100w+",
|
||||
"likedCount": 347,
|
||||
"commentCount": 1970844,
|
||||
"shareCount": 109721,
|
||||
"threadId": "R_SO_4_186016"
|
||||
}
|
||||
],
|
||||
"code": 200
|
||||
}
|
||||
```
|
||||
|
||||
### 热门评论
|
||||
|
||||
说明 : 调用此接口 , 传入 type, 资源 id 可获得对应资源热门评论 ( 不需要登录 )
|
||||
@ -2783,12 +2839,14 @@ type : 地区
|
||||
**1. 后端代理模式 (默认)**
|
||||
|
||||
文件通过服务器转发到云存储,调用简单,但受服务器限制:
|
||||
|
||||
- Vercel Serverless Functions 限制请求体大小为 4.5MB
|
||||
- 自建服务器需配置足够大的请求体限制
|
||||
|
||||
**2. 客户端直传模式 (推荐用于 Vercel)**
|
||||
|
||||
文件直接从客户端上传到云存储服务器,绕过服务器限制:
|
||||
|
||||
- 支持大文件上传
|
||||
- 适合 Vercel、Netlify 等有请求体限制的平台
|
||||
- 需要前端配合实现
|
||||
@ -2800,12 +2858,14 @@ type : 地区
|
||||
**接口地址 :** `/cloud/upload/token`
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
- `cookie`: 网易云音乐 Cookie (在请求体中传递)
|
||||
- `md5`: 文件 MD5 值
|
||||
- `fileSize`: 文件大小(字节)
|
||||
- `filename`: 文件名
|
||||
|
||||
**返回数据 :**
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 200,
|
||||
@ -2824,6 +2884,7 @@ type : 地区
|
||||
**接口地址 :** `/cloud/upload/complete`
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
- `cookie`: 网易云音乐 Cookie (在请求体中传递)
|
||||
- `songId`: 歌曲 ID
|
||||
- `resourceId`: 资源 ID
|
||||
@ -2831,6 +2892,7 @@ type : 地区
|
||||
- `filename`: 文件名
|
||||
|
||||
**可选参数 :**
|
||||
|
||||
- `song`: 歌曲名
|
||||
- `artist`: 艺术家
|
||||
- `album`: 专辑名
|
||||
@ -2858,6 +2920,7 @@ type : 地区
|
||||
**调用例子 :** `/cloud/match?uid=32953014&sid=aaa&asid=bbb` `/cloud/match?uid=32953014&sid=bbb&asid=0`
|
||||
|
||||
### 获取云盘歌词
|
||||
|
||||
说明: 调用此接口, 获取云盘歌曲的歌词,歌词来自此文件的音乐元数据`LYRICS`标签。
|
||||
|
||||
**可选参数 :**
|
||||
@ -4951,12 +5014,11 @@ let data = encodeURIComponent(
|
||||
|
||||
**调用例子:** `/vip/sign/info`
|
||||
|
||||
|
||||
### 用户的创建歌单列表
|
||||
|
||||
说明 : 调用此接口, 传入用户id, 获取用户的创建歌单列表
|
||||
|
||||
**必选参数 :**
|
||||
**必选参数 :**
|
||||
|
||||
`uid`: 用户 id
|
||||
|
||||
@ -4974,7 +5036,7 @@ let data = encodeURIComponent(
|
||||
|
||||
说明 : 调用此接口, 传入用户id, 获取用户的收藏歌单列表
|
||||
|
||||
**必选参数 :**
|
||||
**必选参数 :**
|
||||
|
||||
`uid`: 用户 id
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<meta name="KEYWords" contect="网易云音乐,网易云音乐 api,网易云音乐 nodejs,网易云音乐 node.js">
|
||||
<meta name="description" content="网易云音乐 NodeJS API Enhanced">
|
||||
<title>网易云音乐 NodeJS API Enhanced</title>
|
||||
<link rel="icon" href="favicon.ico">
|
||||
<link rel="icon" href="netease.png">
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta name="referrer" content="never">
|
||||
|
||||
6
public/docs/logo.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<g>
|
||||
<path fill="none" d="M0 0h24v24H0z"/>
|
||||
<path d="M10.421 11.375c-.294 1.028.012 2.064.784 2.653 1.061.81 2.565.3 2.874-.995.08-.337.103-.722.027-1.056-.23-1.001-.52-1.988-.792-2.996-1.33.154-2.543 1.172-2.893 2.394zm5.548-.287c.273 1.012.285 2.017-.127 3-1.128 2.69-4.721 3.14-6.573.826-1.302-1.627-1.28-3.961.06-5.734.78-1.032 1.804-1.707 3.048-2.054l.379-.104c-.084-.415-.188-.816-.243-1.224-.176-1.317.512-2.503 1.744-3.04 1.226-.535 2.708-.216 3.53.76.406.479.395 1.08-.025 1.464-.412.377-.996.346-1.435-.09-.247-.246-.51-.44-.877-.436-.525.006-.987.418-.945.937.037.468.173.93.3 1.386.022.078.216.135.338.153 1.334.197 2.504.731 3.472 1.676 2.558 2.493 2.861 6.531.672 9.44-1.529 2.032-3.61 3.168-6.127 3.409-4.621.44-8.664-2.53-9.7-7.058C2.515 10.255 4.84 5.831 8.795 4.25c.586-.234 1.143-.031 1.371.498.232.537-.019 1.086-.61 1.35-2.368 1.06-3.817 2.855-4.215 5.424-.533 3.433 1.656 6.776 5 7.72 2.723.77 5.658-.166 7.308-2.33 1.586-2.08 1.4-5.099-.427-6.873a3.979 3.979 0 0 0-1.823-1.013c.198.716.389 1.388.57 2.062z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 763 KiB |
BIN
public/docs/netease.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="icon" href="docs/netease.png">
|
||||
<title>网易云音乐 API Enhanced</title>
|
||||
<style>
|
||||
:root {
|
||||
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base",
|
||||
"helpers:pinGitHubActionDigests"
|
||||
]
|
||||
}
|
||||
@ -263,8 +263,9 @@ async function consturctServer(moduleDefs) {
|
||||
})
|
||||
logger.info(`Request Success: ${decode(req.originalUrl)}`)
|
||||
|
||||
// 夹带私货部分:如果开启了通用解锁,并且是获取歌曲URL的接口,则尝试解锁(如果需要的话)ヾ(≧▽≦*)o
|
||||
if (
|
||||
(req.baseUrl === '/song/url/v1' || req.baseUrl === '/song/url') &&
|
||||
req.baseUrl === '/song/url/v1' &&
|
||||
process.env.ENABLE_GENERAL_UNBLOCK === 'true'
|
||||
) {
|
||||
const song = moduleResponse.body.data[0]
|
||||
@ -279,7 +280,7 @@ async function consturctServer(moduleDefs) {
|
||||
logger.info('Starting unblock(uses general unblock):', req.query.id)
|
||||
const result = await matchID(req.query.id)
|
||||
song.url = result.data.url
|
||||
song.freeTrialInfo = 'null'
|
||||
song.freeTrialInfo = null
|
||||
logger.info('Unblock success! url:', song.url)
|
||||
}
|
||||
if (song.url && song.url.includes('kuwo')) {
|
||||
|
||||