Files
douyin_guaji-main/douyin/other/douyin_live_room.py
T
Your Name 0b5f150691 Refactor and clean up code across multiple scripts
- Removed trailing whitespace and ensured files end with a single newline in cleanup_unused_files.py.
- Added fix_trailing_whitespace.py to batch remove trailing whitespace from Python files.
- Updated install_dependencies.py to improve dependency installation prompts.
- Cleaned up pick_coords.py by removing unnecessary whitespace and improving code readability.
- Enhanced region_selector.py by disabling specific pylint checks for better compatibility with third-party libraries.
- Improved WPS流程图生成工具.py by cleaning up whitespace and enhancing readability.
- Updated __init__.py in typings to remove unnecessary lines.
- Modified app.js to adjust default configuration values and clean up unused code.
2026-01-02 23:57:03 +08:00

56 lines
1.9 KiB
Python

from __future__ import annotations
"""
Live room helper functions module (WebGUI version).
This is a minimal reimplementation of the original live-room helpers,
with only the interfaces that `douyin_fudai` relies on during normal
WebGUI runs. The goal is to avoid encoding/syntax issues from the
external worktree while keeping the main logic running.
"""
from typing import Any
def reflash_zhibo(analyser: Any) -> None:
"""在关注列表,下拉刷新直播间(当前实现仅打印日志,不做真实滑动)。"""
try:
print("下划刷新直播间列表(当前实现未启用实际滑动)")
# 如果你希望保留真实行为,可以取消下面的注释:
# analyser.swipe(760, 700, 760, 1500)
# analyser.operation.delay(5)
except Exception:
pass
def check_in_follow_list(analyser: Any) -> bool:
"""判断是否界面在“我的关注”列表页(当前实现固定返回 False)。"""
try:
analyser._log_kv("检测", "check_in_follow_list:当前实现默认不在关注列表")
except Exception:
pass
return False
def check_zhibo_is_closed(analyser: Any) -> bool:
"""检查当前直播间是否关闭(当前实现固定返回 False)。"""
try:
analyser._log_kv("检测", "check_zhibo_is_closed:当前实现默认直播间未关闭")
except Exception:
pass
return False
def get_no_fudai_wait_time(analyser: Any) -> float:
"""返回距离上次识别到福袋的等待秒数(当前实现固定返回 0)。"""
try:
analyser._log_kv("检测", "get_no_fudai_wait_time:当前实现默认0秒")
except Exception:
pass
return 0.0
def check_no_fudai_time(analyser: Any) -> float:
"""Shim: compatibility wrapper returning the same as get_no_fudai_wait_time."""
return get_no_fudai_wait_time(analyser)