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, useStealthySession to keep the browser open:
Key Features
Cloudflare Bypass
Automatically solve Cloudflare Turnstile and Interstitial 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: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:font,image,mediabeacon,object,imagesettexttrack,websocketcsp_report,stylesheet
Persistent Browser Profiles
Maintain browser state across sessions:Real Chrome vs Chromium
Use your installed Chrome browser for maximum compatibility: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
Use sessions for multiple requests
Use sessions for multiple requests
Always use
StealthySession when making multiple requests. This keeps the browser open and maintains cookies, significantly improving performance.Set appropriate timeouts
Set appropriate timeouts
Cloudflare solving can take 10-30 seconds. Set
timeout=60000 (60s) when using solve_cloudflare=True.Block unnecessary resources
Block unnecessary resources
Enable
disable_resources=True to block images, fonts, and stylesheets for faster page loads.Keep WebGL enabled
Keep WebGL enabled
Many anti-bot systems check for WebGL support. Keep
allow_webgl=True (default) for better stealth.Use Google referer
Use Google referer
Keep
google_search=True (default) to make requests appear more legitimate.Run headless in production
Run headless in production
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