The flags.go default text is already outdated compared to the main library. These will all become stale over time and could trigger bot detection.
Fix
Options:
Define a single const DefaultUserAgent in the extractor package and reference it everywhere
Use the sites/useragents package to dynamically fetch the current most common user-agent on startup (more robust but adds a network dependency)
At minimum, update flags.go to match the current version and add a comment noting it needs periodic updates
**Parent:** #3
## Description
Multiple places hardcode user-agent strings with different Firefox versions:
- `playwright.go:94` — `Firefox/142.0`
- `interactive.go:62` — `Firefox/142.0`
- `cmd/browser/pkg/browser/flags.go:20` — `Firefox/133.0` (older!)
The flags.go default text is already outdated compared to the main library. These will all become stale over time and could trigger bot detection.
## Fix
Options:
1. Define a single `const DefaultUserAgent` in the extractor package and reference it everywhere
2. Use the `sites/useragents` package to dynamically fetch the current most common user-agent on startup (more robust but adds a network dependency)
3. At minimum, update flags.go to match the current version and add a comment noting it needs periodic updates
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent: #3
Description
Multiple places hardcode user-agent strings with different Firefox versions:
playwright.go:94—Firefox/142.0interactive.go:62—Firefox/142.0cmd/browser/pkg/browser/flags.go:20—Firefox/133.0(older!)The flags.go default text is already outdated compared to the main library. These will all become stale over time and could trigger bot detection.
Fix
Options:
const DefaultUserAgentin the extractor package and reference it everywheresites/useragentspackage to dynamically fetch the current most common user-agent on startup (more robust but adds a network dependency)Starting work on this. Will define
const DefaultUserAgentin a central location and reference it from all three locations.Work finished. PR: #39 (merged)
Defined
DefaultUserAgentconstant (Firefox/147.0) and replaced all three inline UA strings.