加入自动二次登录,每天2次

This commit is contained in:
liuwei
2025-05-08 15:56:33 +08:00
parent a889c2fd83
commit bbc3757d38
2 changed files with 21 additions and 6 deletions

View File

@@ -68,6 +68,10 @@ def main(chat_type: int):
# # 秀人网每天自动发pdf
# robot.onEveryTime("17:30", robot.xiu_ren_pdf_send)
# 每天进行二次登录检查
robot.onEveryTime("00:01", robot.login_twice_auto_auth)
robot.onEveryTime("12:01", robot.login_twice_auto_auth)
# 启动Dashboard服务器
dashboard_server = None
try:

View File

@@ -586,6 +586,17 @@ class Robot(Job):
self.contacts_db.delete_chatroom_all_info(group_id)
self.LOG.info("联系人信息刷新完成")
def login_twice_auto_auth(self) -> None:
try:
self.LOG.info(f"定时进行二次登录动作")
resp = self.ipad_bot.twice_auto_auth()
if resp:
self.LOG.info(f"定时二次登录成功!")
else:
self.LOG.error(f"定时二次登录失败!")
except Exception as e:
self.LOG.error(f"login_twice_auto_auth error: {e}")
# ============================================== 业务内容==========================================================
def news_baidu_report_auto(self) -> None: