Codex and Claude Opus 4.7
0d01dabb69
P2 §5.3: 23 处 importlib.import_module → 静态 from import
...
把剩余 5 个文件里所有动态导入 douyin_screenshot_manager 的 importlib 调用
替换为顶部静态 from import 模式:
- douyin/detection/douyin_pixel.py 7 处
- douyin/detection/douyin_detection.py 8 处
- douyin/fudai/douyin_fudai_finder.py 4 处
- douyin/fudai/core/fudai_attend.py 2 处
- gui/gui_app.py 2 处
douyin_screenshot_manager 只引用 douyin.core.path_config,与上述 5 个文件
无循环依赖。bin/run_cli.py 的剩余 1 处 importlib 是有意为之
(绕过 package __init__ 遮蔽),保留。
收益:
- 可读性 + IDE 跳转/类型提示
- 每次调用省去 ~100µs 的 import_module 开销(detection 模块在热路径上调用密集)
- 死代码减少 ~92 行(5 个文件合计 -115 / +23)
回归:140 .py 编译通过;importlib 残留只剩 bin/run_cli 故意 1 处;
5 个模块导入 + fudai_analyse + should_skip_fudai_by_config 业务链路正常;
test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:06:23 +08:00
Codex and Claude Opus 4.7
4f147d214e
P2 §5.3: 4 处单点 importlib.import_module → 静态 from import
...
把单次调用 douyin_screenshot_manager 的 importlib 改为 from-import:
- douyin/core/douyin_flow_control.py
- douyin/core/underlying_operations.py
- douyin/fudai/core/fudai_debug_utils.py
- douyin/stage/douyin_stage.py
douyin_screenshot_manager 只引用 douyin.core.path_config,与上述 4 个文件
无循环依赖,可以安全静态化。bin/run_cli.py 的 importlib 是有意为之
(绕过 package __init__ 遮蔽),保留。
收益:
- 可读性 + IDE 跳转/类型提示
- 每次调用省去 ~100µs 的 import_module 开销
回归:140 .py 编译通过;4 处 importlib 残留全清;
test_filter_logging / check_web_gui_config_sync 通过;
douyin_screenshot_manager 仍可正常加载。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:01:16 +08:00
Codex and Claude Opus 4.7
7fb0c3849c
P0 死代码清理:删 .backup / 空文件 / GUI 占位桩 / 占位目录 / 失效测试
...
A. 删除 3 个 .backup 文件(约 3.4K 行)
- douyin/detection/douyin_pixel.py.backup
- douyin/stage/douyin_stage_handler.py.backup
- gui/components/log_color_config.py.backup
B. 删除 0 字节文件
- douyin/other/douyin_stuck_guard.py
- docs/功能差异对比.md
- docs/archive/模块化代码对比说明.md
C. 删除 9 个 TODO + pass 占位组件(全仓零外部引用)
- gui/components/{config_manager,image_viewer,stats_display,
reservation_display,high_value_rooms_display,ocr_panel,main_window}.py
- gui/web_components/{proc_runner,http_handler}.py
D. 删除占位目录与失效测试入口
- douyin/detection/core/ 仅 re-export 占位
- douyin/fudai/finder/ 仅 re-export 占位
- tests/run_test.py 指向已删的 deleted_tests_backup/
附加:tools/diagnostics/check_web_gui_config_sync.py --help 字符串里
tools/web_gui_config_manifest.json 旧路径修正为 tools/dev/...
回归:154 → 141 个 .py,全量 compileall 通过;AST 扫描 0 处 import 残留;
gui.gui_app/web_gui/gui_core 仍可加载;fudai_analyse / should_skip_fudai_by_config
业务函数链路正常;test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 10:36:59 +08:00
Codex and Claude Opus 4.5
73cfb50a2b
chore: 删除 fudai_core 中的未使用 import
...
去除大规模拆分后剩余的死 import:
- PIL.Image (未引用)
- numpy as np (未引用)
- douyin_reservation_logic (未引用)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:49:38 +08:00
Codex and Claude Opus 4.5
41c3f28eb7
chore: 删除死文件 douyin/fudai/core/fudai_detail_reader.py
...
该文件只有一个函数 get_fudai_contain(1217 行),但无任何模块
import 它。所有调用方都用的是 douyin_fudai_core.get_fudai_contain。
注:本次 fudai_detail_modules/ 合并时引入的 fudai_detail_orchestrator.py
里的 get_fudai_contain 引用是从 douyin_fudai_core 来的,与本文件无关。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:36:48 +08:00
Codex and Claude Opus 4.5
242876f679
refactor: 删除 fudai_core 中重复的 attend_choujiang 实现
...
attend_choujiang 在 fudai_core.py 中的旧版本只是一个回退实现:
开头就先尝试委派到 fudai_attend.attend_choujiang(更新版本),
1597 行的本地实现实际上是死代码——只在 import 失败时才会执行,
而 fudai_attend.py 一直存在。
简化为薄包装函数,直接调用 fudai_attend 中的实现。
文件行数:3799 -> 2208(减 1591 行,约 42%)
本次会话累计 fudai_core 减少:6393 -> 2208(减 4185 行,65%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:28:52 +08:00
Codex and Claude Opus 4.5
61ec06092d
refactor: 删除 fudai_core 中重复的两个超大函数
...
douyin_fudai_core.py 中的 should_skip_fudai_by_config (~480 行) 和
basic_join_decision (~1940 行) 与 fudai_filter.py 中的实现高度重复。
保留 fudai_filter.py 中的版本,删除 douyin_fudai_core.py 中的副本。
兼容性:保留薄包装函数,所有现有 import 路径继续工作。
文件行数:6206 -> 3799(减 2407 行,约 39%)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:16:12 +08:00
Codex and Claude Opus 4.5
7d834d316f
refactor: 删除 fudai_core 中重复的 check_contain
...
check_contain 在 fudai_filter.py 中已有完全相同的实现。
通过顶部 import 直接复用,删除 douyin_fudai_core.py 中的副本。
文件行数:6250 -> 6206(减 44 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:11:45 +08:00
Codex and Claude Opus 4.5
e38640eb63
refactor: 删除 fudai_core 中重复的 4 个开奖检查函数
...
check_lucky_draw_result / check_have_reward_notice_confirm /
check_in_order_confirm_page / get_reward 在 fudai_result_checker.py
中已有更新版本(使用 preprocess_for_ocr 等改进)。
douyin_fudai_core.py 中保留薄包装函数作为兼容 re-export,
确保任何旧调用点继续工作。
文件行数:6347 -> 6250(减 97 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:08:43 +08:00
Codex and Claude Opus 4.5
0031f17ebc
refactor: 抽取 is_watch_task_fudai / _is_short_countdown_text 到 fudai_filter
...
douyin_fudai_core.py 中存在与 fudai_filter.py 完全重复的
is_watch_task_fudai 实现,_is_short_countdown_text 也属于过滤逻辑。
集中到 fudai_filter.py 后,douyin_fudai_core.py 保留薄包装函数
作为兼容 re-export,确保所有既有调用点继续工作。
文件行数:6393 -> 6347(减 46 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:04:40 +08:00
Codex and Claude Opus 4.5
b137aead48
refactor: 合并 fudai_detail_modules/ 到 douyin/fudai/core/
...
将 fudai_detail_modules/ 6 个模块全部迁移到 douyin/fudai/core/:
- fudai_detail_coupon_detection.py
- fudai_detail_operations.py
- fudai_detail_room_title.py
- fudai_detail_utils.py
- fudai_detail_validator.py
- fudai_detail_reader.py -> fudai_detail_orchestrator.py(避免与 core/ 已有同名文件冲突)
更新所有 import:
- douyin/fudai/douyin_fudai_core.py
- douyin/fudai/douyin_fudai_detail.py
删除 fudai_detail_modules/ 空目录及其 README/__init__。
验证:python -m compileall 全项目通过。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 08:46:11 +08:00
Codex and Claude Opus 4.5
cb4d25abdf
refactor: 删除死代码 _parse_mm_ss / _extract_2digits
...
这两个内嵌函数定义后从未被调用(grep 验证)。
time_utils.py 中已有公共版本可供未来使用。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 00:34:19 +08:00
Codex and Claude Opus 4.5
8fe7ff0585
refactor: 根目录核心模块迁移到 douyin/core/ 和 douyin/logging/
...
将 4 个根目录核心模块迁移到合理位置:
- path_config.py -> douyin/core/path_config.py
- version.py -> douyin/core/version.py
- Underlying_Operations.py -> douyin/core/underlying_operations.py
- unified_logger.py -> douyin/logging/unified_logger.py
配套更新所有 import:
- path_config: 41 处 import 改为 douyin.core.path_config
- version: 4 处改为 douyin.core.version
- unified_logger: 5 处改为 douyin.logging.unified_logger
- Underlying_Operations: 14 处改为 douyin.core.underlying_operations
修复 path_config.PROJECT_ROOT 计算(向上 2 级而非当前目录)。
验证:python -m compileall 全项目通过。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 00:23:14 +08:00
Codex
13b1f2150c
Fix launcher paths and remove local hardcoding
2026-05-20 19:18:34 +08:00
Your Name
6933c0b4fe
优化:调整参与按钮区域坐标,修正按钮覆盖范围
2026-01-25 20:50:16 +08:00
Your Name
272dcab91d
优化:调整参与按钮区域坐标,增强对部分机型底部按钮的覆盖;更新调试截图逻辑以使用新坐标
2026-01-25 16:58:15 +08:00
Your Name
4903e50ff2
优化:调整代码格式,增强可读性
2026-01-23 15:29:09 +08:00
Your Name
3b4293365d
优化:调整日志保留天数和压缩设置,增强日志管理;添加预约记录检查逻辑,避免直播间循环
2026-01-18 15:20:21 +08:00
Your Name
d31a3ffee3
优化:调整basic_join_decision函数中的失败计数逻辑,提升代码可读性
2026-01-18 14:22:40 +08:00
Your Name
27bb48c881
优化:增加连续失败处理逻辑,避免直播间卡死;调整抽奖参与逻辑,限制重试次数;添加购物红包OCR复查功能
2026-01-18 13:36:12 +08:00
Your Name
5519deb11b
参与: 添加连续失败上限,避免卡死在无法识别的福袋上
2026-01-18 00:03:06 +08:00
Your Name
4b9b6cdf8f
优化预约和滑动处理逻辑
2026-01-17 21:35:32 +08:00
Your Name
3ce0aa73dd
feat: 优化当前直播间标题获取逻辑,提升匹配准确性
2026-01-17 19:34:57 +08:00
Your Name
3488624b8f
feat: 优化预约逻辑,增强映射表记录功能,提升用户体验
2026-01-17 18:46:13 +08:00
Your Name
54a99d4bbd
feat: 优化代码格式,提升可读性和一致性
2026-01-17 18:07:43 +08:00
Your Name
b940c91e2e
feat: 更新映射表以包含福袋详情信息,增强预约逻辑
2026-01-17 17:59:11 +08:00
Your Name
3fbd2b2d85
feat: 调整高价值福袋参与阈值,优化预约逻辑以提升用户体验
2026-01-17 09:26:41 +08:00
Your Name
1283645b75
feat: 更新基本加入决策逻辑,增加关闭详情页的操作以优化用户体验
2026-01-17 09:19:38 +08:00
Your Name
a724de4094
feat: 更新预约逻辑,允许在成功预约后继续进行决策而非直接返回
2026-01-17 08:59:18 +08:00
Your Name
35819da24b
feat: 更新预约成功后直接返回,优化基本加入决策逻辑
2026-01-17 08:52:05 +08:00
Your Name
55a3f3a0af
feat: 增强福袋详情记录功能,优化映射表记录逻辑,修复重复标题处理
2026-01-17 08:48:23 +08:00
Your Name
716567dbb0
feat: 优化预约福袋参与逻辑,修复锁定期处理和映射表记录,新增重复标题去重功能
2026-01-17 08:43:21 +08:00
Your Name
44519f2f6b
feat: 更新筛选逻辑,添加按钮文本记录和条件跳过原因,优化日志记录
2026-01-16 19:58:19 +08:00
Your Name
ca77862a86
feat: 添加滑动坐标配置功能,优化滑动操作的灵活性
2026-01-16 19:18:37 +08:00
Your Name
8d31e0ba1a
feat: 启用杨浩功能并调整日志时间戳设置为系统时间
2026-01-16 17:46:09 +08:00
Your Name
575d6f3fd5
feat: 添加按钮文本过滤功能以优化筛选逻辑,并支持真实时间戳记录
2026-01-16 16:50:19 +08:00
Your Name
e7b0b666d1
refactor: 移除并行OCR子任务的单独性能日志输出以避免日志重复
2026-01-16 16:43:56 +08:00
Your Name
238241b0dc
refactor: 移除重复的性能日志输出以简化日志记录
2026-01-16 16:43:35 +08:00
Your Name
7c839c5d39
feat: 优化直播间标题识别逻辑,增强缓存管理和错误处理
2026-01-16 16:15:40 +08:00
Your Name
5b377472f4
feat: 优化直播间标题识别逻辑,增加缓存管理以提升性能
2026-01-16 13:22:08 +08:00
Your Name
f5618d014d
feat: 添加直播间标题识别功能,优化缓存机制以避免重复OCR
2026-01-16 13:08:26 +08:00
Your Name
ea960a73da
feat: 优化代码格式,提升可读性和维护性
2026-01-16 12:58:18 +08:00
Your Name
da098fafdc
feat: 更新福袋相关配置,优化任务数量处理逻辑,增强映射表记录功能
2026-01-16 12:53:59 +08:00
Your Name
3723c39a58
feat: 优化福袋详情记录逻辑,提升代码可读性
2026-01-16 03:44:53 +08:00
Your Name
df65adfe4e
feat: 更新配置文件以启用调试捕获,调整福袋相关坐标,优化预约处理逻辑,增强界面显示信息
2026-01-16 03:04:11 +08:00
Your Name
78e53603d3
feat: 添加开奖等待时间戳,优化参与逻辑中的状态管理
2026-01-16 02:18:50 +08:00
Your Name
ea1e3dd876
Refactor fudai detection and logging mechanisms
...
- Improved logging for task count retrieval and warnings in `douyin_fudai_core.py` and `douyin_stage.py`.
- Enhanced error handling and logging in `fudai_detail_reader.py` to provide clearer insights when task counts are not saved.
- Updated template matching logic in `douyin_detection.py` to include detailed logging and error handling for template loading and matching processes.
- Refactored screenshot handling and debugging paths to ensure better traceability and error reporting.
- Adjusted default task count values to zero where applicable to prevent unintended behavior.
2026-01-16 02:08:01 +08:00
Your Name
c46c1402b5
feat: 优化基本加入决策函数中的导入和代码格式,提升可读性
2026-01-15 23:04:09 +08:00
Your Name
d2c5ca57e8
feat: 更新房间状态管理,优化直播间标题记录逻辑,移除过时的房间位置映射文件
2026-01-15 23:03:56 +08:00
Your Name
d1f675073f
feat: 更新房间位置映射表,修改标题为海宁齐总
2026-01-15 16:19:08 +08:00