fix(browser): correct headless mode default behavior

Modify BrowserConfig to respect explicit headless parameter setting instead of forcing True. Update version to 0.6.2 and clean up code formatting in examples.

BREAKING CHANGE: BrowserConfig no longer defaults to headless=True when explicitly set to False
This commit is contained in:
UncleCode
2025-04-26 21:09:50 +08:00
parent ccec40ed17
commit 2140d9aca4
4 changed files with 404 additions and 211 deletions

View File

@@ -1,3 +1,3 @@
# crawl4ai/_version.py
__version__ = "0.6.1"
__version__ = "0.6.2"

View File

@@ -427,7 +427,7 @@ class BrowserConfig:
host: str = "localhost",
):
self.browser_type = browser_type
self.headless = headless or True
self.headless = headless
self.browser_mode = browser_mode
self.use_managed_browser = use_managed_browser
self.cdp_url = cdp_url