Przeglądaj źródła

!2 no chache and do not accept big monster

pcacc 5 miesięcy temu
rodzic
commit
c3c1e20807
2 zmienionych plików z 9 dodań i 1 usunięć
  1. 8 0
      app_dongri.py
  2. 1 1
      dongri_task.py

+ 8 - 0
app_dongri.py

@@ -25,6 +25,14 @@ isGameBegin = True
 autoTask = None
 isReset = False
 
+@app.after_request
+def add_no_cache_header(response):
+    # 添加禁用缓存的响应头
+    response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
+    response.headers["Pragma"] = "no-cache"
+    response.headers["Expires"] = "0"
+    return response
+
 def thread_runTask():
     global last_process
     global task_queue,isReset

+ 1 - 1
dongri_task.py

@@ -756,7 +756,7 @@ class task_activity_lianmeng(dongri_task):
         waitClickImg_noWait_withBool(special_activity_img.task_done, 2, 1)
         
         if waitFindImg_withBool(special_activity_img.doing_task, 2, 1) == False:
-            if waitClickImg_noWait_withBool((special_activity_img.shili, special_activity_img.shili2, special_activity_img.bigMonster), 2, 1) == True:
+            if waitClickImg_noWait_withBool((special_activity_img.shili, special_activity_img.shili2), 2, 1) == True:
                 if waitClickImg_noWait_withBool(special_activity_img.accept_task, 2, 1) == False:
                     return False