- Refactor `gui_core.py` to improve code readability and maintainability by adding line breaks for long statements. - Introduce `inspect_lines.py` script for inspecting specific line ranges in files. - Add `generate_param_locations.py` to scan the repository and generate a report of function definitions, argparse parameters, and tracking calls. - Implement `param_usage_tool.py` for analyzing `param_usage.json` records and scanning code for tracking calls. - Create `simulate_reservation_preempted_flow.py` and `simulate_reservation_preempted_flow_dynamic.py` to validate behavior of reservation logic under specific conditions. - Add global parameter tracking feature in `run_cli.py` to enable detailed usage tracing.
福袋详情模块目录
本目录包含 douyin_fudai_detail.py 的模块化子模块。
文件结构
fudai_detail_room_title.py- 直播间标题处理模块fudai_detail_operations.py- 福袋详情页操作模块(打开/关闭)fudai_detail_coupon_detection.py- 优惠券弹窗检测模块fudai_detail_reader.py- 福袋详情读取模块fudai_detail_validator.py- 数据验证模块fudai_detail_utils.py- 工具函数模块__init__.py- 包初始化文件
使用方式
所有功能通过主模块 douyin_fudai_detail 导出,使用方式保持不变:
import douyin_fudai_detail
# 使用导出的函数
douyin_fudai_detail.close_fudai_detail(analyser)
douyin_fudai_detail.read_fudai_detail_once(analyser)
# ... 等等
模块说明
fudai_detail_room_title.py
处理直播间标题的OCR识别、噪音过滤、规范化等功能。
fudai_detail_operations.py
处理福袋详情页的打开和关闭操作。
fudai_detail_coupon_detection.py
检测当前弹窗是否为优惠券弹窗,而非真正的福袋详情页。
fudai_detail_reader.py
执行福袋详情的OCR识别和读取,包括单次读取和重试读取。
fudai_detail_validator.py
验证福袋详情数据的合理性,检测识别错误。
fudai_detail_utils.py
提供通用的工具函数。