Skip to main content
StealthyFetcher provides advanced anti-bot bypass capabilities using a stealth-patched Chromium browser. It can automatically solve Cloudflare Turnstile challenges and bypass most online bot detection systems.

Basic Usage

One-Off Requests

With StealthySession

For multiple requests, use StealthySession to keep the browser open:

Key Features

Cloudflare Bypass

Automatically solve Cloudflare Turnstile and Interstitial challenges:
Supported Cloudflare challenges:
  • Non-interactive Turnstile
  • Interactive Turnstile
  • Interstitial pages
  • “Just a moment” waiting pages

Fingerprint Spoofing

Multiple techniques to avoid detection:
Canvas Fingerprinting: Adds random noise to canvas operations to prevent tracking.WebRTC Blocking: Forces WebRTC to respect proxy settings, preventing local IP leaks.WebGL: Keep enabled by default - many WAFs check for WebGL support.

Google Search Referer

Make requests appear as if they came from Google search:
This sets the referer header to look like: https://www.google.com/search?q=example.com

Request Parameters

StealthyFetcher.fetch()

Advanced Features

Page Actions

Execute custom automation before returning the response:

Wait for Selectors

Wait for specific elements before returning:

Resource Blocking

Block unnecessary resources for faster loading:
Blocked resource types:
  • font, image, media
  • beacon, object, imageset
  • texttrack, websocket
  • csp_report, stylesheet

Persistent Browser Profiles

Maintain browser state across sessions:

Real Chrome vs Chromium

Use your installed Chrome browser for maximum compatibility:
Using real_chrome=True requires Chrome to be installed on your system.

CDP URL Connection

Connect to an existing browser instance:

Session Management

Basic Session

Async Session

Adaptive Mode

Enable adaptive element finding for website changes:

Error Handling

Best Practices

Always use StealthySession when making multiple requests. This keeps the browser open and maintains cookies, significantly improving performance.
Cloudflare solving can take 10-30 seconds. Set timeout=60000 (60s) when using solve_cloudflare=True.
Enable disable_resources=True to block images, fonts, and stylesheets for faster page loads.
Many anti-bot systems check for WebGL support. Keep allow_webgl=True (default) for better stealth.
Keep google_search=True (default) to make requests appear more legitimate.
Use headless=True in production. Set to False only for debugging.

Comparison with Other Fetchers

Next Steps

Browser Automation

Learn about DynamicFetcher for general automation

Sessions

Master session management

Proxy Rotation

Rotate proxies for stealth sessions