Prechádzať zdrojové kódy

fix: enable headless mode in BrowserManager for production environment

chengchongzhen 1 rok pred
rodič
commit
331ebe035a
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      browser_utils.py

+ 1 - 1
browser_utils.py

@@ -29,7 +29,7 @@ class BrowserManager:
         co.set_pref("credentials_enable_service", False)
         co.set_pref("credentials_enable_service", False)
         co.set_argument("--hide-crash-restore-bubble")
         co.set_argument("--hide-crash-restore-bubble")
         co.auto_port()
         co.auto_port()
-        # co.headless(True)  # 生产环境使用无头模式
+        co.headless(True)  # 生产环境使用无头模式
 
 
         # Mac 系统特殊处理
         # Mac 系统特殊处理
         if sys.platform == "darwin":
         if sys.platform == "darwin":