fix: consolidate user-agent strings into DefaultUserAgent constant
Define DefaultUserAgent (Firefox/147.0) in playwright.go and reference it from NewBrowser, NewInteractiveBrowser, and CLI flags. Previously three different UA strings existed (two at 142.0, one outdated at 133.0). Closes #17 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,7 +59,7 @@ type interactiveBrowser struct {
|
||||
func NewInteractiveBrowser(ctx context.Context, opts ...BrowserOptions) (InteractiveBrowser, error) {
|
||||
var thirtySeconds = 30 * time.Second
|
||||
opt := mergeOptions(BrowserOptions{
|
||||
UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0",
|
||||
UserAgent: DefaultUserAgent,
|
||||
Browser: BrowserFirefox,
|
||||
Timeout: &thirtySeconds,
|
||||
Dimensions: Size{
|
||||
|
||||
Reference in New Issue
Block a user