This repository has been archived on 2026-10-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
NeteaseUrl/tests/golden/responses.json
T
snowy-yang da3d013e9c chore: 清理前端与容器脚本中指向已删台账的过时编号
模板/样式/脚本的注释里散落着「第 N 条」「F59」「P3-43」这类编号,它们指向的
修复验收台账与交接文档已在本轮删除——留着既检索不到、也对不上号,还让后来读
注释的人以为存在一份可查的编号清单。本次只动注释,正文零改动。

覆盖范围(全仓一致):
- templates/index.html 163 处、static/site_auth.js 55 处,共 218 处编号整段摘除
  (含「第 N 条(Px):」前缀与「(Fxx 短标签)」括号)。
- 容器/配置 16 处:docker-compose.yml、entrypoint.sh(F59 / 第 93 条 / 第 97 条)、
  Dockerfile(T7 / 第 97 条)、.dockerignore(T1 / 第 97 条 / 第 55 条 / P2-9)、
  .env.example(F59 / 第 100 条 / 「详见交接文档 F11」这条失效指引)、.gitignore(P3-41)。
- Python 4 处:core/config.py(D-1)、services/tasks.py(O-5×2)、services/_shared.py(O-5)
  ——上一轮 Python 侧清理的漏网。

为什么规则要收窄(两类误伤,实测踩到):
1. 标签首字母不能用泛化的 [A-Z]:X5 是 QQ 浏览器内核、ES5 是 JS 版本,都不是编号。
   泛化后会把「微信 XWeb/X5、QQ 内置」改成「微信 XWeb/、QQ 内置」,把
   「Chromium <87 的老 X5 不识别 inset」改成「老 不识别」。现按本仓真实用过的
   任务族白名单收窄(A B C D F O P R S T U),X5/ES5 原样保留。
2. 括号内「编号 + 长说明」不能整段删:「(F51 只防了切歌,这里补同歌翻页)」
   整段删掉会连说明一起丢;现只摘编号、保留说明文字。

为什么同步改黄金契约快照:题头注释属于模板内容,改了注释首页字节数必然变
(466261 → 464333),tests/golden/responses.json 的 index 条目按既定流程刷新
html_len/html_sha256;并在 tests/test_golden.py 补一段说明,写清该条目记的是
「当前模板」而非 Flask 期数值、以及有意改模板后如何重算
(html_len = 文件字节数 - 1,sha256 = 文件去掉末尾换行后的哈希)。

验证(全部通过):
- 与 HEAD 比对:剥离全部注释后的正文逐行一致(唯一差异是删掉了一处行尾空注释),
  行数不变、每行半角括号/引号数量不变 → 代码与字符串零改动;
- node --check 通过(静态 JS + index.html 内联脚本),<style> 块花括号平衡;
- 真实 uvicorn 冒烟:/health /user/status /api/topen → 200、/admin/site/backup/list → 403,
  /static/site_auth.js 响应体与本地文件 sha1 相同,/ 无「第 N 条」残留;
- ruff All checks passed;pyright 0 errors / 0 warnings;pytest 144 passed。
2026-09-26 13:18:44 +08:00

540 lines
10 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[
{
"name": "health",
"auth": "none",
"method": "GET",
"path": "/health",
"payload": null,
"status": 200,
"body": {
"data": {
"cookie_count": 3,
"cookie_status": "valid",
"downloads_dir": "configured",
"service": "running",
"timestamp": 1790391125,
"version": "2.4.0"
},
"message": "API服务运行正常",
"status": 200,
"success": true
}
},
{
"name": "api_info",
"auth": "none",
"method": "GET",
"path": "/api/info",
"payload": null,
"status": 200,
"body": {
"data": {
"config": {
"downloads_dir": "configured",
"max_body_bytes": "2MB(备份上传 200MB)"
},
"description": "云村小助手 · 网易云音乐解析/下载服务",
"endpoints": {
"/album": "GET/POST - 获取专辑详情",
"/api/info": "GET - API信息",
"/api/playlist/play": "GET/POST - 公开歌单播放API(id/level/limit)",
"/download": "POST - 下载音乐(付费动作仅接受 POST)",
"/global/playlist": "GET/POST - 全局账号歌单详情",
"/global/playlists": "GET/POST - 全局账号歌单列表",
"/health": "GET - 健康检查",
"/playlist": "GET/POST - 获取歌单详情",
"/podcast/download": "POST - 播客单集下载",
"/podcast/download/batch_zip": "POST - 整台播客打包ZIP",
"/podcast/hot": "GET/POST - 热门播客与分类",
"/podcast/parse": "GET/POST - 播客解析(电台/单集)",
"/podcast/programs": "GET/POST - 播客单集列表(分页)",
"/podcast/search": "GET/POST - 播客搜索",
"/search": "GET/POST - 搜索音乐",
"/song": "GET/POST - 获取歌曲信息"
},
"name": "云村小助手API服务",
"supported_qualities": [
"standard",
"exhigh",
"lossless",
"hires",
"sky",
"jyeffect",
"jymaster",
"dolby"
],
"version": "2.4.0"
},
"message": "API信息获取成功",
"status": 200,
"success": true
}
},
{
"name": "toplist_unauth",
"auth": "none",
"method": "POST",
"path": "/toplist",
"payload": {},
"status": 401,
"body": {
"error_code": "unauthorized",
"message": "请先登录后再使用解析功能",
"status": 401,
"success": false
}
},
{
"name": "user_status_unauth",
"auth": "none",
"method": "POST",
"path": "/user/status",
"payload": {},
"status": 200,
"body": {
"data": {
"cookie": {
"is_valid": false
},
"user": null
},
"message": "个人账号未登录",
"status": 200,
"success": true
}
},
{
"name": "user_logout",
"auth": "none",
"method": "POST",
"path": "/user/logout",
"payload": {},
"status": 200,
"body": {
"data": {
"is_valid": false
},
"message": "已退出登录",
"status": 200,
"success": true
}
},
{
"name": "auth_trial",
"auth": "none",
"method": "POST",
"path": "/auth/trial",
"payload": {},
"status": 400,
"body": {
"message": "注册即送 3 次免费下载次数,请直接注册账号",
"status": 400,
"success": false
}
},
{
"name": "auth_sendcode_badpurpose",
"auth": "none",
"method": "POST",
"path": "/auth/send_code",
"payload": {
"email": "x@y.com",
"purpose": "bad"
},
"status": 400,
"body": {
"message": "验证码用途不正确",
"status": 400,
"success": false
}
},
{
"name": "auth_register_shortuser",
"auth": "none",
"method": "POST",
"path": "/auth/register",
"payload": {
"username": "ab",
"password": "12345678",
"email": "a@b.com",
"code": "x",
"agree": "1"
},
"status": 400,
"body": {
"message": "用户名需 3-20 位,仅支持中文、字母、数字、下划线,且不能纯下划线",
"status": 400,
"success": false
}
},
{
"name": "auth_register_noagree",
"auth": "none",
"method": "POST",
"path": "/auth/register",
"payload": {
"username": "abcdef",
"password": "12345678",
"email": "a@b.com",
"code": "x",
"agree": "0"
},
"status": 400,
"body": {
"message": "请先阅读并同意《用户协议》与《隐私政策》",
"status": 400,
"success": false
}
},
{
"name": "auth_register_badcode",
"auth": "none",
"method": "POST",
"path": "/auth/register",
"payload": {
"username": "abcdef",
"password": "12345678",
"email": "a@b.com",
"code": "zz",
"agree": "1"
},
"status": 400,
"body": {
"message": "邮箱验证码错误或已过期",
"status": 400,
"success": false
}
},
{
"name": "auth_redeem_unauth",
"auth": "none",
"method": "POST",
"path": "/auth/redeem",
"payload": {
"code": "X"
},
"status": 401,
"body": {
"error_code": "unauthorized",
"message": "请先登录",
"status": 401,
"success": false
}
},
{
"name": "auth_forgot_shortpwd",
"auth": "none",
"method": "POST",
"path": "/auth/forgot_password",
"payload": {
"email": "a@b.com",
"code": "x",
"password": "short"
},
"status": 400,
"body": {
"message": "新密码长度需在 8-128 位之间",
"status": 400,
"success": false
}
},
{
"name": "admin_logs_forbidden",
"auth": "user",
"method": "POST",
"path": "/admin/logs",
"payload": {},
"status": 403,
"body": {
"message": "需要管理员权限,请使用管理员账号登录",
"status": 403,
"success": false
}
},
{
"name": "admin_site_users_forbidden",
"auth": "user",
"method": "POST",
"path": "/admin/site/users",
"payload": {},
"status": 403,
"body": {
"error_code": "forbidden",
"message": "需要管理员权限",
"status": 403,
"success": false
}
},
{
"name": "admin_qr_forbidden",
"auth": "user",
"method": "POST",
"path": "/admin/qr/create",
"payload": {},
"status": 403,
"body": {
"message": "需要管理员权限,请使用管理员账号登录",
"status": 403,
"success": false
}
},
{
"name": "global_playlists_forbidden",
"auth": "user",
"method": "POST",
"path": "/global/playlists",
"payload": {},
"status": 403,
"body": {
"error_code": "forbidden",
"message": "需要管理员权限",
"status": 403,
"success": false
}
},
{
"name": "download_unauth",
"auth": "none",
"method": "POST",
"path": "/download",
"payload": {
"id": "1"
},
"status": 401,
"body": {
"error_code": "unauthorized",
"message": "请先登录后再使用解析功能",
"status": 401,
"success": false
}
},
{
"name": "download_badid",
"auth": "user",
"method": "POST",
"path": "/download",
"payload": {
"id": "abc"
},
"status": 400,
"body": {
"message": "无效的歌曲 ID",
"status": 400,
"success": false
}
},
{
"name": "download_badquality",
"auth": "user",
"method": "POST",
"path": "/download",
"payload": {
"id": "347230",
"quality": "nope"
},
"status": 400,
"body": {
"message": "无效的音质参数,支持: standard, exhigh, lossless, hires, sky, jyeffect, jymaster, dolby",
"status": 400,
"success": false
}
},
{
"name": "task_list_unauth",
"auth": "none",
"method": "POST",
"path": "/api/task/list",
"payload": {
"device_id": "x"
},
"status": 401,
"body": {
"error_code": "unauthorized",
"message": "请先登录后再使用解析功能",
"status": 401,
"success": false
}
},
{
"name": "task_cancel_unauth",
"auth": "none",
"method": "POST",
"path": "/api/task/cancel",
"payload": {
"task_id": "x"
},
"status": 401,
"body": {
"error_code": "unauthorized",
"message": "请先登录后再使用解析功能",
"status": 401,
"success": false
}
},
{
"name": "queue",
"auth": "none",
"method": "POST",
"path": "/api/queue",
"payload": {},
"status": 200,
"body": {
"data": {
"avg_batch_seconds": null,
"batch_active": 0,
"batch_capacity": 3,
"batch_waiting": 0,
"download_active": 0,
"download_capacity": 10,
"download_waiting": 0
},
"message": "获取排队状态成功",
"status": 200,
"success": true
}
},
{
"name": "delivery_404",
"auth": "user",
"method": "POST",
"path": "/download/result",
"payload": {
"task_id": "nope"
},
"status": 404,
"body": {
"message": "任务不存在或已过期",
"status": 404,
"success": false
}
},
{
"name": "delivery_batch_404",
"auth": "user",
"method": "POST",
"path": "/download/batch_zip/result",
"payload": {
"task_id": "nope"
},
"status": 404,
"body": {
"message": "任务不存在或已过期",
"status": 404,
"success": false
}
},
{
"name": "fe_error_nomsg",
"auth": "none",
"method": "POST",
"path": "/api/fe_error",
"payload": {},
"status": 400,
"body": {
"message": "缺少 msg 参数",
"status": 400,
"success": false
}
},
{
"name": "play_badkey",
"auth": "none",
"method": "POST",
"path": "/api/playlist/play",
"payload": {
"id": 3778678
},
"status": 401,
"body": {
"message": "需要有效的 API 密钥(请联系站点管理员获取)",
"status": 401,
"success": false
}
},
{
"name": "podcast_programs_badid",
"auth": "user",
"method": "POST",
"path": "/podcast/programs",
"payload": {
"radio_id": "abc"
},
"status": 400,
"body": {
"message": "无效的电台 ID",
"status": 400,
"success": false
}
},
{
"name": "song_badid",
"auth": "user",
"method": "POST",
"path": "/song",
"payload": {
"id": "abc"
},
"status": 400,
"body": {
"message": "无效的歌曲ID,请输入数字ID或分享链接",
"status": 400,
"success": false
}
},
{
"name": "comments_badid",
"auth": "user",
"method": "POST",
"path": "/comments",
"payload": {
"id": "abc"
},
"status": 400,
"body": {
"message": "无效的歌曲ID,请输入数字ID或分享链接",
"status": 400,
"success": false
}
},
{
"name": "playlist_badid",
"auth": "user",
"method": "POST",
"path": "/playlist",
"payload": {
"id": ""
},
"status": 400,
"body": {
"message": "参数 'playlist_id' 不能为空",
"status": 400,
"success": false
}
},
{
"name": "album_badid",
"auth": "user",
"method": "POST",
"path": "/album",
"payload": {
"id": "abc"
},
"status": 400,
"body": {
"message": "无效的专辑ID,请输入数字ID或分享链接",
"status": 400,
"success": false
}
},
{
"name": "index",
"auth": "none",
"method": "GET",
"path": "/",
"payload": null,
"status": 200,
"body": null,
"html_len": 464333,
"html_sha256": "0596d87ccbe8e7b5a19494c5d1ab1fd11bc95b82665ddc600ba90e4f2f790b06"
}
]