Explorar o código

keep fixing shts

Jason hai 1 ano
pai
achega
93e4bef238
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      website_clickjobs/gen_seo.py

+ 6 - 1
website_clickjobs/gen_seo.py

@@ -77,7 +77,12 @@ def run_once(jsobj):
     i=100
     if driver is None:
         time.sleep(8)
-        re_get_webdriver()
+        options = webdriver.ChromeOptions()
+        options.add_argument('--headless')
+    #    options.add_argument("--user-agent=" +user_agent)
+        options.add_argument("--incognito")
+        options.add_argument('--disable-dev-shm-usage')
+        driver = webdriver.Chrome(options=options)
     if driver is None:
         return
     try: