Ver código fonte

Update Docker

naibo 1 ano atrás
pai
commit
c8b71835de

+ 4 - 1
ExecuteStage/easyspider_executestage.py

@@ -558,7 +558,10 @@ class BrowserThread(Thread):
         self.print_and_log(f"任务执行完毕,将在{quitWaitTime}秒后自动退出浏览器并清理临时用户目录,等待时间可在保存任务对话框中设置。")
         self.print_and_log(f"The task is completed, the browser will exit automatically and the temporary user directory will be cleaned up after {quitWaitTime} seconds, the waiting time can be set in the save task dialog.")
         time.sleep(quitWaitTime)
-        self.browser.quit()
+        try:
+            self.browser.quit()
+        except:
+            pass
         self.print_and_log("正在清理临时用户目录……|Cleaning up temporary user directory...")
         try:
             shutil.rmtree(self.option["tmp_user_data_folder"])

+ 1 - 0
ExecuteStage/myChrome.py

@@ -23,6 +23,7 @@ class MyChrome(webdriver.Chrome, webdriver.Remote):
 
     def __init__(self, mode='local_driver', *args, **kwargs):
         self.iframe_env = False  # 现在的环境是root还是iframe
+        self.mode = mode
         if mode == "local_driver":
             webdriver.Chrome.__init__(self, *args, **kwargs)
         elif mode == "remote_driver":