Files
douyin_guaji-main/douyin/core/underlying_operations_pkg
CodexandClaude Opus 4.7 fb82213d53 refactor(underlying): 抽 _get_screenshot_direct 到 underlying_operations_pkg/screenshot_direct (2416 → 1930)
497 行的 ADB 截图实现(含 exec-out 主路径 + 多重兜底 + watchdog)整段抽到
underlying_operations_pkg/screenshot_direct.capture_screenshot_direct,
原方法保留 9 行 thin shim:

    def _get_screenshot_direct(self, device_id, path="pic"):
        from douyin.core.underlying_operations_pkg.screenshot_direct import (
            capture_screenshot_direct,
        )
        return capture_screenshot_direct(self, device_id, path)

净减 486 行。函数体过深的两层嵌套截图逻辑现在独立成模块,方便单独测试与改进。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 22:55:34 +08:00
..