Releases: status403com/patchright-go
Release list
v0.2.0
patchright-go v0.2.0
What's new
Configurable driver version
You can now pin a specific patchright driver version via RunOptions.Version instead of always using the library's built-in default:
pw, err := patchright.Run(&patchright.RunOptions{
Version: "1.60.0",
})When Version is not set, the built-in default is used (current behavior, unchanged).
Credits
- Patchright by Vinyzu
- playwright-go by Max Schmitt
- Playwright by Microsoft
v0.1.0
patchright-go v0.1.0
Idempotent setup, configurable paths, and documentation improvements.
What's new
Idempotent Run()
Run() now auto-installs the driver and browsers if they're missing — no separate install step required. Calling Run() multiple times is safe; it only downloads what's needed.
BrowsersPath option
New BrowsersPath field on RunOptions lets you control where browsers are downloaded without setting env vars:
pw, err := patchright.Run(&patchright.RunOptions{
BrowsersPath: patchright.String("/custom/browsers"),
})CWD-local driver default
The default driver directory changed from the system cache to <cwd>/bin/patchright-driver, keeping project dependencies self-contained.
Use your own Chrome
You can point to an existing Chrome installation instead of downloading one:
browser, err := pw.Chromium.Launch(patchright.BrowserTypeLaunchOptions{
ExecutablePath: patchright.String("/usr/bin/google-chrome"),
Headless: patchright.Bool(false),
})Other changes
- Added comprehensive feature tests and wired into CI
- Added CONTRIBUTING.md, issue templates, and PR template
- Improved README with architecture overview, memory benchmarks, and troubleshooting guide
- Added unofficial community port disclaimer
Credits
- Patchright by Vinyzu
- playwright-go v0.6100.0 by Max Schmitt
- Playwright v1.61.1 by Microsoft
v0.0.1: initial release
patchright-go v0.0.1
Port of playwright-go v0.6100.0 made to work with the Patchright driver. Thin Go client wrapping the Node.js Patchright server over stdio pipes. Early version — has not been tested in a production environment yet.
Based on playwright-go v0.6100.0 (which bundles Playwright v1.61.1), tracking Patchright v1.61.1.
Features
- All evaluate methods use
isolatedContextby default (avoids Runtime.enable CDP leak) - Init script injection via
patchrightInitScriptroute interception NewStealthPage/NewStealthContext: automatic HeadlessChrome → Chrome UA patchingPatchHeadlessUA()helper for manual UA transformation- Per-browser UA cache (
sync.Once, no global contention at scale) - All config via
RunOptionsstruct fields (env vars optional) - Concurrency-safe for 50+ simultaneous browser instances
Anti-detection
Patchright patches the Playwright driver to evade bot detection:
navigator.webdriverreturnsfalse- No
Runtime.enableorConsole.enableCDP leaks --disable-blink-features=AutomationControlledflag applied- Closed Shadow DOM support
Important: Prefer headful mode (Headless: false) over headless. Anti-bot solutions like PerimeterX can still detect headless browsers via deep fingerprinting even with Patchright patches.
Quick start
import patchright "github.com/status403com/patchright-go"
pw, _ := patchright.Run()
defer pw.Stop()
browser, _ := pw.Chromium.Launch(patchright.BrowserTypeLaunchOptions{
Headless: patchright.Bool(false),
})
defer browser.Close()
page, _ := browser.NewStealthPage()
page.Goto("https://example.com")Credits
- Patchright by Vinyzu
- playwright-go v0.6100.0 by Max Schmitt
- Playwright v1.61.1 by Microsoft