This commit is contained in:
HuangHai
2026-01-13 09:10:03 +08:00
parent 7f62d84049
commit 7c1864b995
9 changed files with 86 additions and 100 deletions

View File

@@ -173,6 +173,24 @@ class ReadImageKit:
logger.error(f"Failed to detect ad popup: {e}")
return None
@staticmethod
def _to_minutes(t_str: str) -> int:
"""HH:MM -> 分钟数"""
if not t_str or ":" not in t_str:
return 0
try:
h, m = map(int, t_str.split(":"))
return h * 60 + m
except:
return 0
@staticmethod
def _fmt(t: int) -> str:
"""分钟数 -> HH:MM"""
h = t // 60
m = t % 60
return f"{h:02d}:{m:02d}"
@staticmethod
def _extract_json(text: str) -> str:
if not text: