Browse Source

keep fixing shts

Jason 1 năm trước cách đây
mục cha
commit
93e4bef238
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  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: