Challenges & Anti-Bot
Gated pages are the #1 reason scrapes fail. Webrain surfaces the gate explicitly and handles it with a persistent profile + real Chrome + session.Read challenge on every navigate
After webrain_navigate(url), check the challenge field in the response:
challenge: null→ page loaded normally → extract.challenge: cloudflare_challenge(title “Just a moment…”,_cf_chl*,cf-turnstile) orchallenge: blocked(403/forbidden) → the page is gated.
The native way (persistent profile + real Chrome + session)
- Start real Chrome on a persistent profile:
webrain launch <service> <profile> <url>orwebrain_session(op=login, service, profile, url)— native vault + TOTP login that auto-waits challenges and claims Turnstile/reCAPTCHA/hCaptcha widgets. Do not reload-spam — that resets the proof. - On a 2FA/approval gate, login returns
waiting_for_human:true— the human acts in the headed browser, then call login again. - Re-attach webrain to that Chrome:
CDP_URL=http://127.0.0.1:9222(orwebrain_session(op=open, cdp_url=...)). Same profile → session/cookies shared. webrain_navigatethe protected URL →challenge: null, authenticated → extract normally.
waiting_for_human:true).
Obscura with --stealth may pass these — always verify via the challenge
field before trusting the result.
Consent gates (Google)
Set the consent cookies once, then every tab skips the dialog:Cross-browser cookie transfer
Log in once in real Chrome (Turnstile/Cloudflare auto-solve), export, and replay into the batch browser:webrain_session(op=cookies)/webrain cookies --port 9222 --out— export from the live authenticated Chrome.webrain_session(op=setcookies)on the session connection.webrain_batchwithoutcdp_urls— set + batch must share one connection, because obscura isolates cookie jars per CDP connection.
Session cookies die on Chrome restart — export on the live authenticated
browser, before closing it.

