加入自动二次登录,每天2次
This commit is contained in:
4
main.py
4
main.py
@@ -68,6 +68,10 @@ def main(chat_type: int):
|
|||||||
# # 秀人网每天自动发pdf
|
# # 秀人网每天自动发pdf
|
||||||
# robot.onEveryTime("17:30", robot.xiu_ren_pdf_send)
|
# 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服务器
|
||||||
dashboard_server = None
|
dashboard_server = None
|
||||||
try:
|
try:
|
||||||
|
|||||||
11
robot.py
11
robot.py
@@ -586,6 +586,17 @@ class Robot(Job):
|
|||||||
self.contacts_db.delete_chatroom_all_info(group_id)
|
self.contacts_db.delete_chatroom_all_info(group_id)
|
||||||
self.LOG.info("联系人信息刷新完成")
|
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:
|
def news_baidu_report_auto(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user