Update Docker

This commit is contained in:
naibo 2024-04-23 23:55:42 +08:00
parent 0afa159c98
commit c8b71835de
2 changed files with 5 additions and 1 deletions

View File

@ -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"])

View File

@ -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":