Skip to main content

Analyze website anti-bot protections before you scrape

Project description

caniscrape ๐Ÿ”

Know before you scrape. Analyze any website's anti-bot protections in seconds.

Stop wasting hours building scrapers only to discover the site has Cloudflare + JavaScript rendering + CAPTCHA + rate limiting. caniscrape does reconnaissance upfront so you know exactly what you're dealing with before writing a single line of code.

๐ŸŽฏ What It Does

caniscrape analyzes a URL and tells you:

  • What protections are active (WAF, CAPTCHA, rate limits, TLS fingerprinting, honeypots)
  • Difficulty score (0-10 scale: Easy โ†’ Very Hard)
  • Specific recommendations on what tools/proxies you'll need
  • Estimated complexity so you can decide: build it yourself or use a service

๐Ÿš€ Quick Start

Installation

pip install caniscrape

Required dependency:

# Install wafw00f (WAF detection)
pipx install wafw00f

# Install Playwright browsers (for JS detection)
playwright install chromium

Basic Usage

caniscrape https://example.com

Example Output

๐Ÿ” Analyzing: https://newegg.com...
๐Ÿค– Checking robots.txt...
๐Ÿ”ฌ Analyzing TLS fingerprint...
โš™๏ธ Analyzing JavaScript rendering...
๐Ÿ•ต๏ธ Analyzing for behavioral traps (default scan)...
โš”๏ธ Detecting CAPTCHA...
โฑ๏ธ Profiling rate limits with Python client...
๐Ÿ” Running WAF detection...


โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  DIFFICULTY SCORE: 6/10 (Hard)  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚๐Ÿ›ก๏ธ  ACTIVE PROTECTIONS โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
    โœ… robots.txt: Website allows scraping (for details on specific pages, navigate to <url>/robots.txt in your browser.)
    โŒ TLS Fingerprinting: Site blocks standard Python clients but allows browser-like clients.
    โœ… JavaScript: Not required for main content.
    โœ… Behavioral Analysis: No obvious honeypot traps detected.
    โŒ CAPTCHA: Cloudflare Turnstile detected (on page load).
    โŒ Rate Limiting: Blocked Immediately (Blocked after 1 requests with a 3.0s delay.)
    ๐Ÿ’ก Advice: This is likely due to client fingerprinting (TLS fingerprinting, User-Agent, etc.), not a classic rate limit.
       Run the analysis again. A different browser identity will be used, which may not be blocked.
       Otherwise, try the --impersonate flag, it will take longer but is likely to succeed.
    โŒ WAF: Kona SiteDefender by (Akamai)

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ’ก RECOMMENDATIONS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Required Tools:
  โ€ข A CAPTCHA solving service (e.g., 2Captcha, Anti-Captcha).
  โ€ข A library with browser impersonation like curl_cffi, or a full headless browser.
  โ€ข A pool of high-quality proxies (residential or mobile) to rotate IP addresses.

Scraping Strategy:
  โ€ข Implement delays between requests (e.g., 3-5 seconds).
  โ€ข Integrate the CAPTCHA solver into your script to handle challenges when they appear.
  โ€ข Rotate User-Agents and other headers on every request.
  โ€ข Standard Python HTTP clients (like requests/aiohttp) will be blocked.

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Analysis Complete โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

๐Ÿ”ฌ What It Analyzes

1. WAF Detection

Identifies Web Application Firewalls (Cloudflare, Akamai, Imperva, DataDome, PerimeterX, etc.)

2. Rate Limiting

  • Tests with burst and sustained traffic patterns
  • Detects HTTP 429s, timeouts, throttling, soft bans
  • Determines blocking threshold (requests/min)

3. JavaScript Rendering

  • Compares content with/without JS execution
  • Detects SPAs (React, Vue, Angular)
  • Calculates percentage of content missing without JS

4. CAPTCHA Detection

  • Scans for reCAPTCHA, hCaptcha, Cloudflare Turnstile
  • Tests if CAPTCHA appears on load or after rate limiting
  • Monitors network traffic for challenge endpoints

5. TLS Fingerprinting

  • Compares standard Python clients vs browser-like clients
  • Detects if site blocks based on TLS handshake signatures

6. Behavioral Analysis

  • Scans for invisible "honeypot" links (bot traps)
  • Detects if site is monitoring mouse/scroll behavior

7. robots.txt

  • Checks scraping permissions
  • Extracts recommended crawl-delay

๐Ÿ› ๏ธ Advanced Usage

Aggressive WAF Detection

# Find ALL WAFs (slower, may trigger rate limits)
caniscrape https://example.com --find-all

Browser Impersonation

# Use curl_cffi for better stealth (slower but more likely to succeed)
caniscrape https://example.com --impersonate

Deep Honeypot Scanning

# Check 2/3 of links (more accurate, slower)
caniscrape https://example.com --thorough

# Check ALL links (most accurate, very slow on large sites)
caniscrape https://example.com --deep

Combine Options

caniscrape https://example.com --impersonate --find-all --thorough

๐Ÿ“Š Difficulty Scoring

The tool calculates a 0-10 difficulty score based on:

Factor Impact
CAPTCHA on page load +5 points
CAPTCHA after rate limit +4 points
DataDome/PerimeterX WAF +4 points
Akamai/Imperva WAF +3 points
Aggressive rate limiting +3 points
Cloudflare WAF +2 points
Honeypot traps detected +2 points
TLS fingerprinting active +1 point

Score interpretation:

  • 0-2: Easy (basic scraping will work)
  • 3-4: Medium (need some precautions)
  • 5-7: Hard (requires advanced techniques)
  • 8-10: Very Hard (consider using a service)

๐Ÿ”ง Installation Details

System Requirements

  • Python 3.9+
  • pip or pipx

Full Installation

# 1. Install caniscrape
pip install caniscrape

# 2. Install wafw00f (WAF detection)
# Option A: Using pipx (recommended)
python -m pip install --user pipx
pipx install wafw00f

# Option B: Using pip
pip install wafw00f

# 3. Install Playwright browsers (for JS/CAPTCHA/behavioral detection)
playwright install chromium

Dependencies

Core dependencies (installed automatically):

  • click - CLI framework
  • rich - Terminal formatting
  • aiohttp - Async HTTP requests
  • beautifulsoup4 - HTML parsing
  • playwright - Headless browser automation
  • curl_cffi - Browser impersonation

External tools (install separately):

  • wafw00f - WAF detection

๐ŸŽ“ Use Cases

For Developers

  • Before building a scraper: Check if it's even feasible
  • Debugging scraper issues: Identify what protection broke your scraper
  • Client estimates: Give accurate time/cost estimates for scraping projects

For Data Engineers

  • Pipeline planning: Know what infrastructure you'll need (proxies, CAPTCHA solvers)
  • Cost estimation: Calculate proxy/CAPTCHA costs before committing to a data source

For Researchers

  • Site selection: Find the easiest data sources for your research
  • Compliance: Check robots.txt before scraping

โš ๏ธ Limitations & Disclaimers

What It Can't Detect

  • Dynamic protections: Some sites only trigger defenses under specific conditions
  • Behavioral AI: Advanced ML-based bot detection that adapts in real-time
  • Account-based restrictions: Protections that only activate for logged-in users

Legal & Ethical Notes

  • This tool is for reconnaissance only - it does not bypass protections
  • Always respect robots.txt and terms of service
  • Some sites may consider aggressive scanning hostile - use --find-all and --deep sparingly
  • You are responsible for how you use this tool and any scrapers you build

Technical Notes

  • Analysis takes 30-60 seconds per URL
  • Some checks require making multiple requests (may trigger rate limits)
  • Results are a snapshot - protections can change over time

๐Ÿค Contributing

Found a bug? Have a feature request? Contributions are welcome!

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

MIT License - see LICENSE file for details

๐Ÿ™ Acknowledgments

Built on top of:

๐Ÿ“ฌ Contact

Questions? Feedback? Open an issue on GitHub.


Remember: This tool tells you HOW HARD it will be to scrape. It doesn't do the scraping for you. Use it to make informed decisions before you start building.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caniscrape-0.1.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caniscrape-0.1.0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file caniscrape-0.1.0.tar.gz.

File metadata

  • Download URL: caniscrape-0.1.0.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for caniscrape-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a1400b04be3fa94f22a48aa92787d4ee9eee2f61ae6d1dcd4c555f8324b9233d
MD5 efab612f869db16d9ff7c61d67607250
BLAKE2b-256 d5986d44f1e8c93e8d6b677cdfd8f1531edae656808c398caab1166c7ea04ed9

See more details on using hashes here.

File details

Details for the file caniscrape-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: caniscrape-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for caniscrape-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a244f76bfeade6609fbde78aac6d114ffc11f46958ee4e17ad1b2025d679dcf6
MD5 002277196343541e0edc264624ac12e5
BLAKE2b-256 e7bde1075d6cb5d9e52d9bf9e7cf866231137935692e6772e982734fe856a219

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page