Jared 3 жил өмнө
parent
commit
28756354b5
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      hhh/SEO/local_1777.py

+ 4 - 1
hhh/SEO/local_1777.py

@@ -30,6 +30,7 @@ def re_get_webdriver():
         print('closing....')
         driver.quit()
         print('quit....')
+        driver=None
     try:
         ua = userAgents()
 
@@ -44,7 +45,9 @@ def re_get_webdriver():
         options.add_argument("--user-agent=" +user_agent)
         options.add_argument("--incognito")
 
-
+        if driver is not None:
+            print('quit again....')
+            driver.quit()
         driver = webdriver.Chrome(options=options)
 
         driver.set_window_size(1400,1000)