'commit'
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user