Skip to content

Commit

Permalink
Update Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
naibo committed Apr 23, 2024
1 parent 0afa159 commit c8b7183
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ExecuteStage/easyspider_executestage.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,10 @@ def run(self):
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"])
Expand Down
1 change: 1 addition & 0 deletions ExecuteStage/myChrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit c8b7183

Please sign in to comment.