将 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>
福袋详情模块目录
本目录包含 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
提供通用的工具函数。