mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-12 11:37:11 +08:00
Update Docker
This commit is contained in:
parent
0afa159c98
commit
c8b71835de
@ -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"])
|
||||
|
@ -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":
|
||||
|
Loading…
x
Reference in New Issue
Block a user