diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index fb3493473..859f99d3a 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -28,6 +28,7 @@ from ..utils.recognize import RecognizeError, Recognizer, Scene from ..utils.solver import BaseSolver from ..utils.datetime import get_server_weekday, the_same_time +from arknights_mower.utils.news import get_update_time from paddleocr import PaddleOCR import cv2 @@ -465,6 +466,7 @@ def infra_main(self): self.error = True self.planned = True elif not self.todo_task: + get_update_time() if self.party_time is None and self.enable_party: self.clue() if self.clue_count > self.clue_count_limit and self.enable_party: diff --git a/arknights_mower/utils/news.py b/arknights_mower/utils/news.py index 67a9b7589..d15cee470 100644 --- a/arknights_mower/utils/news.py +++ b/arknights_mower/utils/news.py @@ -17,10 +17,10 @@ def get_update_time(): pattern = r"(\d+)月(\d+)日(\d+):(\d+)" result = re.findall(pattern, h1.text)[0] result = list(map(int, result)) + now = datetime.now() update_time = datetime(now.year, result[0], result[1], result[2], result[3]) logger.debug(f"闪断更新时间:{update_time}") - now = datetime.now() if now > update_time: logger.info("闪断更新时间已过") else: