|
@@ -45,9 +45,13 @@ def re_get_webdriver():
|
|
|
print(user_agent)
|
|
|
options.add_argument("--user-agent=" +user_agent)
|
|
|
options.add_argument("--incognito")
|
|
|
-
|
|
|
- driver = webdriver.Chrome(options=options)
|
|
|
-
|
|
|
+ driver=None
|
|
|
+ try:
|
|
|
+ driver = webdriver.Chrome(options=options)
|
|
|
+ except:
|
|
|
+ driver.quit()
|
|
|
+ sys.exit()
|
|
|
+ return
|
|
|
driver.set_window_size(1400,1000)
|
|
|
return
|
|
|
except:
|