dockerbug
This commit is contained in:
@@ -39,6 +39,7 @@ tg-watchbot 是一个轻量级 Python 服务,把 **Telegram 双向客服机器
|
||||
- 支持媒体类型过滤:可选视频、文档、图片、音频。
|
||||
- 支持 SOCKS5/HTTP 代理,适合国内服务器。
|
||||
- 新增 Telegram 二维码登录:设置页填写 `TG_API_ID` / `TG_API_HASH` 后,可扫码生成并保存用户会话。
|
||||
- 修复 Docker / FastAPI 启动报错:移除 `RedirectResponse | HTMLResponse` 联合返回注解,避免被 FastAPI 当成 Pydantic response model 解析。
|
||||
- 内置下载到服务器、断点续传、并发下载等功能,后续可通过配置开启。
|
||||
- 仍兼容手动填写 `TG_API_SESSION`。
|
||||
|
||||
@@ -162,6 +163,8 @@ tg-watchbot 是一个轻量级 Python 服务,把 **Telegram 双向客服机器
|
||||
- [`feedparser`](https://github.com/kurtmckee/feedparser):RSS/Atom 解析。
|
||||
- [`Beautiful Soup`](https://www.crummy.com/software/BeautifulSoup/):HTML 解析和 CSS selector 抽取。
|
||||
- [`PyYAML`](https://pyyaml.org/):`config.yaml` 配置读写。
|
||||
- [`telethon`](https://github.com/LonamiWebs/Telethon):Telegram 用户会话、群监听、二维码登录。
|
||||
- [`qrcode`](https://github.com/lincolnloop/python-qrcode):生成 Telegram 二维码登录图片。
|
||||
- [`python-dotenv`](https://github.com/theskumar/python-dotenv):读取 `.env`。
|
||||
- Python 标准库 `sqlite3`:消息、用户、去重、监控状态持久化。
|
||||
|
||||
@@ -201,9 +204,16 @@ docker compose logs -f
|
||||
修改配置后重启:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
docker compose restart
|
||||
```
|
||||
|
||||
如果只是更新代码,建议直接重新构建并重启容器:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
<a id="manual-install"></a>
|
||||
## 手动安装(Python)
|
||||
|
||||
|
||||
@@ -3198,7 +3198,7 @@ def create_panel_app() -> FastAPI:
|
||||
ai_prompt: str,
|
||||
ai_min_interval_seconds: str,
|
||||
ai_dedupe_window_seconds: str,
|
||||
) -> RedirectResponse | HTMLResponse:
|
||||
) -> Response:
|
||||
cfg = cfg_load_fresh()
|
||||
rows = cfg.setdefault("group_monitors", [])
|
||||
if not isinstance(rows, list):
|
||||
@@ -3264,7 +3264,7 @@ def create_panel_app() -> FastAPI:
|
||||
ai_prompt: str = Form(""),
|
||||
ai_min_interval_seconds: str = Form(str(DEFAULT_GROUP_AI_MIN_INTERVAL_SECONDS)),
|
||||
ai_dedupe_window_seconds: str = Form(str(DEFAULT_GROUP_AI_DEDUPE_WINDOW_SECONDS)),
|
||||
) -> RedirectResponse | HTMLResponse:
|
||||
) -> Response:
|
||||
return await save_group_monitor_common(
|
||||
None,
|
||||
name,
|
||||
@@ -3307,7 +3307,7 @@ def create_panel_app() -> FastAPI:
|
||||
ai_prompt: str = Form(""),
|
||||
ai_min_interval_seconds: str = Form(str(DEFAULT_GROUP_AI_MIN_INTERVAL_SECONDS)),
|
||||
ai_dedupe_window_seconds: str = Form(str(DEFAULT_GROUP_AI_DEDUPE_WINDOW_SECONDS)),
|
||||
) -> RedirectResponse | HTMLResponse:
|
||||
) -> Response:
|
||||
return await save_group_monitor_common(
|
||||
original_index,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user