Ver código fonte

!2 use alias name of datetime

pcacc 1 mês atrás
pai
commit
cec8925206
1 arquivos alterados com 4 adições e 3 exclusões
  1. 4 3
      dongri_task.py

+ 4 - 3
dongri_task.py

@@ -20,6 +20,7 @@ import subprocess
 import socket
 from dongri_pic import _imported
 from datetime import datetime, timedelta
+import datetime as dt
 
 
 '''
@@ -480,7 +481,7 @@ class task_fightMonster(dongri_task):
     def run(self):
         global g_task_lineCheck 
         now = datetime.now()
-        target_time = datetime.datetime.combine(now.date(), time.time(20, 30))
+        target_time = datetime.combine(now.date(), dt.time(20, 30))
 
         # 判断当前时间是否超过20:30
         if now > target_time:
@@ -1634,7 +1635,7 @@ if __name__ == '__main__':
     #yys_ocrAuto(check_img.line_orc)
     #basic_operate.go_town()
     #basic_operate.add_strength()
-    #task_fightMonster(False, False,False).run()
+    task_fightMonster(False, False,False).run()
     #task_checkHelp().run()
     #task_checkStoreRoom().run()
     #task_start_game(1)
@@ -1652,7 +1653,7 @@ if __name__ == '__main__':
     #task_collect(3).run()
     #task_collect(4).run()
     #task_returnAllLine().run()
-    task_paticipateInTeam().run()
+    #task_paticipateInTeam().run()
     #task_fight_jina(True).run()
     #task_get_redPackage().run()
     #task_read_mails().run()