fix: ShowBrowser merge behavior and consistent browser defaults
- Change ShowBrowser from bool to *bool so nil means "don't override" in mergeOptions(), fixing the bug where it always overwrote the base - Add Bool() helper for convenient *bool construction - Align NewInteractiveBrowser default from Chromium to Firefox to match NewBrowser - Update README example and CLI flags for the *bool change Closes #15, #16 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -118,7 +118,7 @@ extractor.BrowserOptions{
|
||||
Browser: extractor.BrowserFirefox, // or BrowserChromium, BrowserWebKit
|
||||
Timeout: &timeout, // default 30s, 0 for no timeout
|
||||
CookieJar: jar, // load/save cookies automatically
|
||||
ShowBrowser: true, // show browser window (non-headless)
|
||||
ShowBrowser: extractor.Bool(true), // show browser window (non-headless)
|
||||
Dimensions: extractor.Size{1280, 720},
|
||||
DarkMode: true,
|
||||
ServerAddress: "ws://...", // remote Playwright server
|
||||
|
||||
Reference in New Issue
Block a user