Your Name 3 years ago
parent
commit
b2014c1f58
1 changed files with 4 additions and 3 deletions
  1. 4 3
      monitor/hhh_404.py

+ 4 - 3
monitor/hhh_404.py

@@ -23,10 +23,11 @@ original_url='https://m.hhh.com.tw/hhh-home-mb/index.html'
 options = webdriver.ChromeOptions()
 options = webdriver.ChromeOptions()
 options.add_argument('--headless')
 options.add_argument('--headless')
 options.add_argument('--disable-gpu')
 options.add_argument('--disable-gpu')
-#options.add_argument('--incognito')
-# options.add_argument('--no-sandbox')
+options.add_argument('--incognito')
+options.add_argument('--no-sandbox')
 options.add_argument('--disable-dev-shm-usage')
 options.add_argument('--disable-dev-shm-usage')
-driver = webdriver.Chrome(desired_capabilities=options.to_capabilities())
+#driver = webdriver.Chrome(desired_capabilities=options.to_capabilities())
+driver = webdriver.Chrome(chrome_options=options)
 
 
 
 
 # Go to the Google home page
 # Go to the Google home page