playground/shizuku
状态:已退役。图片资源已迁入正式
/api/shizuku,旧接口说明统一收口到/api/playground。
临时随机图片 API。数据源来自仓库里的 猫羽雫.txt,服务启动后按本地快照文件 data/playground-shizuku-backgrounds.txt 读取,一行一个 URL,并给每一行分配一个编号。
地址
本机地址:http://127.0.0.1:3001/api/playground/shizuku
公网地址:https://6767.chat/api/playground/shizuku
接口
| 接口 | 用途 |
|---|---|
GET /api/playground/shizuku/health | 检查服务是否运行,并返回有效图片数量、无效行数量和源文件位置。 |
GET /api/playground/shizuku/list | 返回完整编号列表,格式是 id + lineNumber + url + valid。 |
GET /api/playground/shizuku/random | 返回一条随机图片记录的 JSON。 |
GET /api/playground/shizuku/image | 302 跳转到一张随机图片,适合直接当图片地址使用。 |
GET /api/playground/shizuku/image/<id> | 302 跳转到指定编号的图片。 |
GET /api/playground/shizuku/view | 浏览器展示页,支持自动轮播、上一张/下一张和编号跳转。 |
GET /api/playground/shizuku/favourite | 浏览器收藏页,可勾选图片并把编号保存在本地 localStorage。 |
返回示例
curl "https://6767.chat/api/playground/shizuku/list"
curl "https://6767.chat/api/playground/shizuku/random"
curl -I "https://6767.chat/api/playground/shizuku/image"
{
"success": true,
"service": "playground/shizuku",
"total": 125,
"validCount": 125,
"invalidCount": 0,
"data": {
"items": [
{
"id": 1,
"lineNumber": 1,
"url": "https://i0.hdslb.com/bfs/article/8378e9f978e761fcf8d9987228343dd13046a05e.jpg?px=1242x2688",
"valid": true
}
]
}
}
Python 示例
import requests
base_url = "https://6767.chat"
payload = requests.get(f"{base_url}/api/playground/shizuku/random", timeout=10).json()
item = payload["data"]
print(item["id"], item["lineNumber"])
print(item["url"])
image = requests.get(f"{base_url}/api/playground/shizuku/image/{item['id']}", timeout=10, allow_redirects=False)
print(image.status_code, image.headers.get("location"))
数据源
- 源仓库文件:
https://github.com/koishi-shangxue-plugins/koishi-shangxue-apps/blob/refs/heads/main/plugins/jrys-prpr/data/backgroundFolder/%E7%8C%AB%E7%BE%BD%E9%9B%AB.txt - 本地快照文件:
data/playground-shizuku-backgrounds.txt - 当前策略:忽略空行,只给非空行编号;
valid=false的行不会进入随机图接口。
展示页
浏览器打开 /api/playground/shizuku/view 可以直接轮播图片。页面会显示:
- 当前编号
- 源文件行号
- 原图地址
- 自动轮播开关
- 编号跳转按钮
浏览器打开 /api/playground/shizuku/favourite 可以挑图收藏。页面支持:
- 勾选图片并自动保存编号到当前浏览器
localStorage - 按编号、行号、URL 搜索
- 复制已收藏编号
- 导出收藏 JSON
- 批量选中或取消当前筛选结果
更新日志
2026-05-22 新增 favourite 收藏页
- 新增
/api/playground/shizuku/favourite收藏页。 - 支持把编号保存到浏览器
localStorage。 - 支持复制编号和导出 JSON。
2026-05-22 初始发布
- 新增
/api/playground/shizuku/list,按行号生成编号列表。 - 新增
/api/playground/shizuku/random和/api/playground/shizuku/image随机图片接口。 - 新增
/api/playground/shizuku/view轮播展示页。