StealthyFetcher is designed to bypass sophisticated anti-bot protections by mimicking real browser behavior. It’s built on top of Chromium with Patchright and passes most online tests and protections.
Key Features
TheStealthyFetcher includes multiple layers of stealth capabilities:
Browser Fingerprinting Protection
Canvas Fingerprinting
Canvas fingerprinting is a common technique used to identify browsers. Scrapling can add random noise to canvas operations:scrapling/engines/_browsers/_stealth.py:64
WebGL Control
Many WAFs check if WebGL is enabled. Disabling it can trigger detection:scrapling/engines/_browsers/_stealth.py:66
WebRTC IP Leak Prevention
WebRTC can leak your real IP even when using proxies:scrapling/engines/_browsers/_base.py:485-489
User Agent & Headers
Automatic UA Generation
Scrapling automatically generates convincing user agents that match the browser version:scrapling/engines/toolbelt/fingerprints.py:66-86
Google Search Referer
Make requests appear as if they came from Google search:https://www.google.com/search?q=example
Source: scrapling/engines/toolbelt/fingerprints.py:22-46
Browser Configuration
Stealth Arguments
Scrapling uses 60+ browser flags to reduce detectability:scrapling/engines/constants.py:39-99
Real Chrome Mode
Use your installed Chrome browser instead of Chromium:scrapling/engines/_browsers/_base.py:428
Advanced Techniques
Session Persistence
Reuse browser sessions to maintain cookies and local storage:Custom Browser Profile
Use a persistent user data directory to save browser state:Locale & Timezone
Match your target audience’s locale:scrapling/engines/_browsers/_stealth.py:58-60
Resource Blocking
Speed up requests and reduce fingerprinting surface:scrapling/engines/constants.py:2-13
Session Configuration
For spiders, configure stealthy sessions globally:Best Practices
Always Use Headless Mode in Production
Always Use Headless Mode in Production
Headful mode is useful for debugging but headless is faster and more stable:
Combine Multiple Techniques
Combine Multiple Techniques
Layer multiple anti-detection features for best results:
Monitor for Detection
Monitor for Detection
Check response content for signs of blocking:
Browser Control via CDP
Connect to an existing browser via Chrome DevTools Protocol:scrapling/engines/_browsers/_stealth.py:86-87
Related Documentation
Cloudflare Turnstile
Bypass Cloudflare’s Turnstile challenges
Handling Blocked Requests
Detect and handle blocked requests
Performance Optimization
Speed up your scraping
Error Handling
Handle errors gracefully