Эх сурвалжийг харах

feat: 启用无头浏览器

cheng zhen 1 жил өмнө
parent
commit
1c7e9ac79a

+ 1 - 6
browser_utils.py

@@ -29,12 +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()
-
-        # 只在开发环境启用无头模式
-        if os.environ.get("ENV") == "development":
-            co.headless(True)
-        else:
-            co.headless(False)
+        co.headless(True)  # 生产环境使用无头模式
 
 
         # Mac 系统特殊处理
         # Mac 系统特殊处理
         if sys.platform == "darwin":
         if sys.platform == "darwin":