Stealth Chromium for Playwright.
One call gives you a browser whose flags, fingerprint, timezone, locale and input behaviour
all describe the same machine in the same place — instead of a default automation profile with patches bolted on.
⚡ Sixty seconds
pip install grewbrowser
grewbrowser install
from grewbrowser import launch
with launch() as session:
page = session.new_page()
page.goto("https://example.com")
page.human_click("#login")
page.human_type("#email", "someone@example.com")
page.human_scroll(600)
That is the whole setup. No playwright install, no flag lists, no fingerprint JSON to maintain.
💡 Fresh machine? You do not even need
grewbrowser install— the firstlaunch()fetches the browser automatically. SetGREWBROWSER_AUTO_DOWNLOAD=0if you would rather it never touched the network.
✨ What actually changes
| Plain Playwright | grewbrowser | |
|---|---|---|
| 🤖 Automation flags | --enable-automation, navigator.webdriver set |
suppressed, no infobar, no webdriver |
| 🎮 GPU | SwiftShader — a renderer string no real user has | hardware ANGLE: D3D11 / Metal / GL, blocklist bypassed |
| 📡 WebRTC | UDP candidates escape the proxy | disable_non_proxied_udp + permission check |
| 🔑 Proxy auth | a 407 round trip on every tunnel |
credentials held by a loopback relay, zero challenges |
| 🌍 Timezone & locale | your machine's | resolved from the proxy's exit address |
🖱️ click() |
teleports to the exact centre, presses instantly | Bézier path, ~60 Hz events, overshoot + correction, aim pause |
⌨️ fill() |
sets value, zero key events |
per-key intervals that depend on the key pair, typos that get fixed |
🖲️ wheel(0, 2000) |
one impossible 2000px event | real platform notches with ramp-up and ramp-down |
| 🔍 Actionability checks | run in the page's own world | run in a CDP isolated world the page cannot see |
| 💥 Crash | leaked browser + profile directory | atexit + signal hooks kill the whole process tree |
| 🧪 Proof | — | grewbrowser check: 110 probes, headless vs headful |
📦 Install
pip install grewbrowser
pip install "grewbrowser[process]"
[process] adds psutil, which lets the teardown guard kill a browser process
tree even if the driver dies first. Recommended for anything long-running.
Getting a browser 🌐
grewbrowser manages its own Chromium, so a fresh machine needs nothing else:
grewbrowser install
grewbrowser install --version 157.0.8103.78
grewbrowser install --source chromium-snapshots
grewbrowser list
grewbrowser info
grewbrowser clean
Builds land in ~/.grewbrowser (override with GREWBROWSER_CACHE_DIR) and come
from Google's official Chrome for Testing host.
Picking a browser 🎛️
channel= |
What it uses | Downloads? |
|---|---|---|
"auto" (default) |
cached own build → Playwright Chromium → system Chrome → Edge | only if nothing at all is found |
"own" |
grewbrowser's own Chromium | yes, on demand |
"chromium" |
Playwright's Chromium only | no — fails with a hint |
"chrome" / "chrome-beta" |
that system install only | no |
"chromium-system" |
/usr/bin/chromium and friends |
no |
"msedge" |
system Edge | no |
executable_path=... |
your own binary | no |
Named channels are strict on purpose: asking for Chromium and silently getting Chrome would mean a different build, version and GPU strings than you asked for.
🚀 Usage
Sync
from grewbrowser import launch
with launch(headless=True, proxy="http://user:pass@gateway:8080") as session:
print(session.profile.timezone_id, session.profile.locale)
page = session.new_page()
page.goto("https://example.com")
page.human_click("button[type=submit]")
Async
import asyncio
from grewbrowser import launch_async
async def main():
session = await launch_async(headless=True)
try:
page = await session.new_page()
await page.goto("https://example.com")
await page.human_type("#q", "hello")
await page.human_scroll(500)
finally:
await session.close()
asyncio.run(main())
Persistent identity
from grewbrowser import launch_persistent_context
session = launch_persistent_context("./profiles/alice", headless=False)
Cookies and fingerprint live together: the seed is pinned in
<user_data_dir>/.grewbrowser-seed on the first run and read back afterwards.
Delete that one file to re-roll the identity while keeping the cookies.
Many at once
from grewbrowser import BrowserPool
async def scrape(session, url):
page = await session.new_page()
await page.goto(url)
return await page.title()
async with BrowserPool(max_concurrent=4, launches_per_minute=30, proxy=PROXY) as pool:
titles = await pool.map(urls, scrape)
max_concurrent bounds live browsers; launches_per_minute bounds cold starts
— a separate problem, because a hundred simultaneous starts thrash the disk even
when a hundred live browsers would fit in memory. SyncBrowserPool does the
same across a thread pool.
🧬 How one launch works
The order is the point. Each step feeds the next, so nothing has to be patched after the fact:
- 🔌 Proxy — parsed once into a form that can produce a credential-free URL.
- 🌍 GeoIP — the exit address is resolved before the identity is built, so
timezone and locale are part of it rather than bolted on after the first page
already loaded.
geoip="strict"raises instead of warning. - 🎲 Seed — one number. A persistent directory pins it; an explicit
seed=reproduces a run exactly. - 🧍 Profile — user agent, client hints, platform, screen, viewport, GPU strings, cores and memory, all derived from that seed and from the real binary's version, so a 157 build never claims to be 139.
- 🚩 Flags — built by one merge function that de-duplicates by flag key, so a flag can never be present on one launch path and missing on another.
- 🛰️ Relay — a loopback HTTP relay holds the proxy credentials and attaches
Proxy-Authorizationupstream, so Chromium never sees a407. - 🖥️ Launch —
--headless=new, the real browser without a window, never the stripped headless shell. - 🧪 Inject — the fingerprint layer, applied to every realm.
- 🖱️ Humanize — Playwright's input primitives are replaced.
🕵️ The fingerprint layer
Each rule closes a specific, cheap detection:
- 🧬 Prototype, never instance — every patch is a getter on
Navigator.prototype, soObject.getOwnPropertyNames(navigator)stays empty. An own property on the instance is visible in one line of JavaScript. - 🎭 Native source — a single patched
Function.prototype.toStringreports[native code]for every replacement, and it delegates to the parent realm, which closes the classic escape of borrowing a fresh iframe'stoStringand calling it on a patched getter. - 🖼️ Every realm — dynamic
about:blankiframes,srcdoc, nested frames andwindow.frames["name"], each verified separately. - 🎨 Deterministic noise — canvas and audio noise derives from the session seed, so reading the same canvas twice returns the same bytes, exactly as a real GPU does. Random-per-call noise is itself a signal.
- 🧩 Fill gaps, do not invent — on a real Chrome the
chromeobject is left alone,chrome.runtimeincluded: it genuinely does not exist on a normal page, and a stub that adds it stands out more than no stub at all. - 📋 Headers agree with JavaScript — client hints are set through CDP and that
session is kept alive for the page's lifetime, because detaching reverts the
override and leaves
Sec-CH-UAdisagreeing withnavigator.userAgentData. The brand list is copied from a real Chrome on the wire, GREASE entry and order included.
🖱️ The human layer
Timings are not invented. Inter-key intervals and hold times follow the distributions reported for 136M keystrokes (Dhakal et al., CHI 2018); pointing movements follow Fitts' law with the fast-stroke-plus-correction structure from the sub-movement literature — which is why a long move sometimes misses and lands with a short second stroke.
page.human_click("#go")
page.human_type("#email", "a@b.com")
page.human_fill("#email", "a@b.com")
page.human_scroll(600)
page.human_move(400, 300)
page.human_idle(1.5)
page.human
Tuning:
launch(humanize="careful")
launch(humanize="brisk")
launch(humanize={"typing_delay": 90})
launch(humanize=HumanConfig(mistype_chance=0.0))
launch(humanize=False)
Failures are specific — ElementNotVisibleError, ElementNotStableError,
ElementNotEditableError, ElementNotReceivingEventsError — so a failing
selector tells you why, not just that it timed out.
🌍 Proxy, geo and the relay
launch(proxy="http://user:pass@gateway:8080")
launch(proxy={"server": "http://gw:8080", "username": "u", "password": "p"})
launch(proxy=PROXY, geoip="strict")
launch(proxy=PROXY, geoip=False, timezone_id="Asia/Bangkok", locale="th-TH")
- 🛰️ The relay listens on
127.0.0.1with no authentication of its own and attachesProxy-Authorizationupstream. Chromium gets a plain--proxy-server=http://127.0.0.1:<port>, so no password reaches a child process and no tunnel starts with a407. - 🌐 The geo lookup runs through the proxy, because the gateway and the exit are frequently different hosts in different countries. It sends no identifiers and can be turned off entirely.
- 🧦 SOCKS proxies skip both — Chromium cannot authenticate SOCKS on the command
line either, and
urllibcannot route the lookup. Passtimezone_idandlocaleyourself there.
✅ Proving it
grewbrowser check
grewbrowser check --mode headless
grewbrowser check --url https://your-own-site.example
Probes are split into two tiers, which matters the moment you run this on a server:
- coherence — everything grewbrowser controls and must always get right. A failure here is a defect, and it is what the exit code reflects.
- this machine — properties of the host that no patching can create: a hardware GPU, installed fonts, speech-synthesis voices. A GPU-less CI box legitimately fails these, and that is reported, not treated as a bug.
Each tier is printed with a <- differs marker on any check where headless and
headful disagree. Everything runs against a page served from loopback, so there
is no network call and no third-party scoring service — loopback is also a
secure context, which about:blank is not, and without it mediaDevices and
WebGPU would look missing when they are merely unavailable on an insecure origin.
It covers the identity, window geometry, the GPU, canvas and audio noise,
permissions, media devices, WebRTC candidate types, all four iframe realm types
plus the cross-realm toString escape, the known headless tells (fonts,
speech-synthesis voices, navigator.connection, battery API, hover and pointer
media queries, screen orientation, shader precision), the agreement between what
the browser sent and what JavaScript says, and the input layer.
run_checks() is importable if you would rather assert on it in your own tests.
⚠️ This measures self-consistency, not a bot-detection score. It is not a CAPTCHA bypass and makes no claim about any anti-bot vendor.
🧩 Extensions
launch_persistent_context("./profiles/x", extension_paths=["./my_extension"])
Extensions need a persistent context, not a headful one. --headless=new
loads them fine, but launch() builds a non-persistent context, which Chromium
treats as incognito and does not run content scripts in — while the service
worker still starts, so it looks loaded when it is not. grewbrowser warns if
you use the wrong one.
examples/demo_extension/ is a two-line extension that marks each page, so you
can prove loading works before trusting it with a real one.
🖥️ Platforms
| Windows | Linux | macOS | |
|---|---|---|---|
| Own Chromium download | ✅ | ✅ | ✅ |
| ANGLE backend | D3D11 | GL | Metal |
| Wheel notch | 100px | 120px | 40px |
| Process-tree teardown | taskkill /T |
killpg |
killpg |
| CI, offline + live | ✅ | ✅ (Xvfb) | ✅ |
Linux arm64 has no published Chrome for Testing build — use executable_path=
with your own. Headful on Linux needs DISPLAY or WAYLAND_DISPLAY;
grewbrowser warns when neither is set.
⚙️ Reference
Launch arguments
| Argument | Default | Meaning |
|---|---|---|
headless |
True |
--headless=new, the real browser without a window |
proxy |
None |
URL string or Playwright mapping |
geoip |
True |
True warns on failure, "strict" raises, False skips |
humanize |
True |
preset name, HumanConfig, mapping of overrides, or False |
seed |
random | same seed, same identity |
os_family |
host's | "windows" / "darwin" / "linux" |
locale, timezone_id |
from geo | override the lookup |
viewport, screen |
derived | layout viewport and screen resolution |
channel |
"auto" |
see the channel table |
executable_path |
None |
your own binary |
args |
None |
extra flags; these win over the stealth defaults |
stealth_args |
True |
include the stealth flag list at all |
inject_fingerprint |
auto | off automatically for a patched Chromium |
relay |
True |
move proxy credentials to the loopback relay |
native_viewport |
True |
viewport follows the real window instead of being emulated |
extension_paths |
None |
unpacked extensions (persistent contexts) |
permissions |
None |
granted up front |
**context_kwargs |
— | passed straight to new_context |
Environment
| Variable | Effect |
|---|---|
GREWBROWSER_BINARY_PATH |
use this executable, above everything else |
GREWBROWSER_AUTO_DOWNLOAD |
0 stops channel="auto" from ever downloading |
GREWBROWSER_CACHE_DIR |
where managed builds live (default ~/.grewbrowser) |
GREWBROWSER_PATCHED_BINARY |
1 marks the binary as a fingerprint-patched build |
GREWBROWSER_GEOIP_TIMEOUT |
seconds per geo provider (default 8) |
Modules
| Module | Responsibility |
|---|---|
core.profile |
one seed in, one coherent identity out |
core.flags |
build_stealth_args, the flag merge, seed pinning |
core.binary_manager |
discovery: explicit path → env → own build → Playwright → system |
core.download |
fetching and caching grewbrowser's own Chromium |
fingerprint.scripts |
the injected payload |
fingerprint.applier |
context options and the CDP client-hint override |
behavior.curves / .keyboard |
pure motion and keystroke planning |
behavior.world |
CDP isolated worlds for actionability probes |
behavior.human |
the engines and the human_* page methods |
network.proxy / .geoip / .relay |
proxy parsing, exit lookup, credential relay |
session.pool / .teardown |
concurrency limits and guaranteed cleanup |
diagnostics |
the self-check probes |
Every module stands alone: build_stealth_args without launching, resolve_geo
without a browser, humanize_page(page) on a page you opened yourself.
🧪 Development
git clone https://github.com/x2super/grewbrowser
cd grewbrowser
pip install -e ".[dev]"
pytest tests/test_offline.py -q # no browser needed
grewbrowser install
pytest tests/test_live.py -q # launches a real browser
grewbrowser check
CI runs the offline suite on Windows, Linux and macOS across Python 3.10 and 3.13, and the live suite plus the self-check on all three — Linux under Xvfb.
🚧 Honest limits
- 🧪 The fingerprint layer is JavaScript. Careful JavaScript, but a Chromium
patched in C++ is strictly stronger. Point
executable_pathat one and grewbrowser detects it (or setGREWBROWSER_PATCHED_BINARY=1) and skips injection rather than overwriting correct native values. - 🎭 Spoofing a foreign OS is supported but not advised. Fonts and the real GPU come from the host and will contradict the claim.
- 🌐 The geo lookup is a third-party request. It carries no identifiers, and
geoip=Falseturns it off. - 🧦 SOCKS skips the relay and the geo lookup.
- 🔒 Chrome for Testing archives carry no publisher signature. TLS to Google's
host is the trust anchor for the download — the same anchor
playwright installrelies on. The archive's SHA-256 is recorded locally so you can see what you got. - 🚫 No CAPTCHA solving and no authentication bypass. Not included, not planned.
Built for testing your own services, scraping with permission, and research into browser fingerprinting.
Metadata
Release files for grewbrowser 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grewbrowser-0.1.0.tar.gz | 94.0 kB | Without provenance | Details for grewbrowser-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grewbrowser-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for grewbrowser-0.1.0-py3-none-any.whl |
Total release size: 187.9 kB
Release files / grewbrowser-0.1.0.tar.gz
| Download URL | grewbrowser-0.1.0.tar.gz |
|---|---|
| Size | 94.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee6a681b10a46c574f5895eac1e3feaa4dd85e3104d09f9068bfe244bb665c60
|
|
BLAKE2b-256 checksum How to use checksums |
db49221efb9dcb8813442f94f2e68044eb9b81ad4abbcc32589d881f3a69c881
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / grewbrowser-0.1.0-py3-none-any.whl
| Download URL | grewbrowser-0.1.0-py3-none-any.whl |
|---|---|
| Size | 93.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45396faab485f4e432a4a0b41c6d9f133c0d6e9d85720fb9a627c33fa663a18c
|
|
BLAKE2b-256 checksum How to use checksums |
426e5fb4a3fff7805e70666ee9e950566c17243cde630b2ecc4831c60c40f777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for grewbrowser 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.