优化 gui 不急

This commit is contained in:
yml2213
2026-06-22 10:10:51 +08:00
parent 220fcd4052
commit 66b03a7d89
8 changed files with 1087 additions and 153 deletions
+27 -8
View File
@@ -9,6 +9,7 @@
- ✅ 批量账号登录
- ✅ Cookie持久化存储
- ✅ 代理支持
- ✅ GUI导入账号、自动保存配置、代理测试
## 项目结构
@@ -16,7 +17,7 @@
douyu_login_py/
├── main.py # 主入口
├── config.yaml # 配置文件
├── requirements.txt # 依赖
├── pyproject.toml # uv项目配置
├── douyu/ # 斗鱼登录模块
│ ├── config.py # 配置管理
│ ├── crypto.py # 加密工具
@@ -39,12 +40,30 @@ douyu_login_py/
## 安装依赖
```bash
pip install -r requirements.txt
uv sync
```
## 配置
## GUI使用
编辑 `config.yaml`
GUI不再依赖 `config.yaml` 启动,账号数据在界面里导入,代理、极验重试、日志等级和账号列表会自动保存到 `data/gui_state.json`
```bash
uv run python main.py --gui
```
支持导入格式:
```text
用户名|密码|邮箱|邮箱密码
```
也可以导入 `txt``csv``json``yaml` 文件。旧版 `config.yaml` 可直接在 GUI 中作为 YAML 文件导入,用来迁移账号数据。
代理区域支持 API 获取和静态代理,填写后可以点击“测试代理”验证出口连通性。开始批量登录时也会先进行代理预检,只有拿到可用出口后才会继续登录流程。
## 命令行配置
命令行模式仍使用 `config.yaml`
```yaml
accounts:
@@ -62,22 +81,22 @@ accounts:
```bash
# 登录第一个账号
python main.py
uv run python main.py
# 登录指定索引的账号
python main.py -i 0
uv run python main.py -i 0
```
### 批量登录
```bash
python main.py --batch
uv run python main.py --batch
```
### 详细日志
```bash
python main.py -v
uv run python main.py -v
```
## 登录流程