stealth-scraping

stealth-scraping is a skill for Claude Code, Codex from DekryptLabs/dlbrowser. It costs 80 tokens per session (5,443 once invoked), scanned A, original, MIT.

A set of Python techniques for collecting data from websites that try to detect automated visitors. It covers browser-like connections, stealth browser settings, block detection, and finding information through several sources.

In plain words
What is it for?
Use it when building Python scrapers that need to access protected websites, rotate request details, detect blocking, or combine RSS feeds and search engines.
Why use it?
It helps scrapers handle anti-bot systems such as Cloudflare and DataDome, while reducing false alarms caused by ordinary page scripts and styles.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/dekryptlabs/dlbrowser/stealth-scraping
Any agent
npx skills add DekryptLabs/dlbrowser --skill stealth-scraping
Clone the repo
git clone --depth 1 https://github.com/DekryptLabs/dlbrowser

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for stealth-scraping

README.md
[![agentmods](https://agentmods.dev/badge/skills/dekryptlabs/dlbrowser/stealth-scraping.svg)](https://agentmods.dev/skills/dekryptlabs/dlbrowser/stealth-scraping)
Your own site
<a href="https://agentmods.dev/skills/dekryptlabs/dlbrowser/stealth-scraping"><img src="https://agentmods.dev/badge/skills/dekryptlabs/dlbrowser/stealth-scraping.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,443 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.05443
Opus 5 $0.00040 $0.02721
Sonnet 5 $0.00016 $0.01089
Haiku 4.5 $0.00008 $0.00544

Measured 5d ago against content hash bc7708c0484c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

stealth-scraping scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/stealth-scraping/SKILL.md · 489 lines

How it starts

The opening of the file, as written. The whole thing — 489 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stealth Scraping Patterns

curl_cffi — TLS Fingerprint Impersonation

curl_cffi impersonates Chrome's exact TLS ClientHello bytes. Most WAFs that reject httpx/requests accept curl_cffi transparently.

from curl_cffi import requests as curl_requests

# Correct: proxy=URL (singular string), impersonate=specific version
session = curl_requests.AsyncSession(
    impersonate="chrome131",  # Use: chrome120, chrome124, chrome131 (NOT chrome133 — unsupported)
    proxy=PROXY_URL,          # Singular string, NOT a dict
    timeout=20.0,
)

Common mistake: proxies={"http": url, "https": url} — WRONG. Use proxy=url (singular). Common mistake: impersonate="chrome133" — NOT supported by curl_cffi. Use chrome120, chrome124, or chrome131.

playwright-stealth — Correct API

from playwright.async_api import async_playwright
from playwright_stealth import Stealth

stealth = Stealth()
# ... create context ...
await stealth.apply_stealth_async(context)

NOT from playwright_stealth import stealth_async — that import doesn't exist.

Block Detection Heuristics

CRITICAL: Strip <script> and <style> tags BEFORE checking block patterns. Many legitimate news sites embed reCAPTCHA/Cloudflare JavaScript that contains strings like "captcha", "recaptcha", "challenge-platform" — these are false positives, not actual blocks.

import re

# Patterns that indicate REAL block pages (after JS/CSS stripping)
BLOCK_PATTERNS = [
    "access denied",
    "verify you are human",
    "enable javascript and cookies",
    "theme-beta",
    "rate limited",
    "too many requests",
    "just a moment",
    "cf-browser-verification",
    "enable javascript to run this app",
    "bot detection",
    "automated access",
    "your request originates from an undeclared automated tool",
    "please verify you are a human",
    "security check",
    "ddos protection",
]

# Context-dependent: only match on short pages (<2000 chars)
CONTEXT_BLOCK_PATTERNS = ["blocked", "robot"]

def _is_blocked(text: str) -> bool:
    if not text:
        return True
    # STRIP JS/CSS FIRST — this is the #1 fix for false positives
    cleaned = re.sub(r'<script[^>]*>.*?</script>', '', text, flags=re.DOTALL | re.IGNORECASE)
    cleaned = re.sub(r'<style[^>]*>.*?</style>', '', cleaned, flags=re.DOTALL | re.IGNORECASE)
    cleaned_lower = cleaned.lower()
    for pattern in BLOCK_PATTERNS:
        if pattern in cleaned_lower:
            return True
    if len(text) < 2000:
        visible_text = re.sub(r'<[^>]+>', '', cleaned).lower()
        visible_text = re.sub(r'\s+', ' ', visible_text).strip()
        for pattern in CONTEXT_BLOCK_PATTERNS:
            if pattern in visible_text:
                return True
    if len(text) < 500:
        stripped = re.sub(r'<[^>]+>', '', text)
        stripped = re.sub(r'[{};:.\\-_=+#/\\|@!~*()\[\]"\'<>,0-9\\s]', '', stripped)
        if len(stripped) < 50:
            return True
    return False

Read the full file on GitHub · 489 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 489 lines · 80 tokens per session scan A bc7708c0484c

Subscribe to this mod's changes

stealth-scraping is a skill published in the GitHub repository DekryptLabs/dlbrowser (1 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 5,443 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

x402

Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…

browser-use/browser-use · 175 tokens

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work.

browser-use/browser-use · 26 tokens

remote-browser

Controls an isolated Browser Use Cloud browser from a sandboxed machine with the current Browser Use CLI.

browser-use/browser-use · 22 tokens

cloud

Documentation reference for using Browser Use Cloud — the hosted API and SDK for browser automation. Use this skill whenever the user needs help with the Cloud REST API (v2, v3, or v4), browser-use-sdk (Python or TypeScript), X-Browser-Use-API-Key authentication, cloud sessions, browser profiles, profile sync, CDP…

browser-use/browser-use · 177 tokens

Agent Browser Automation

Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.

PramodDutta/qaskills · 37 tokens

imprint-google-flights-live-audit

Audit and repair generated Google Flights Imprint tools. Use when validating Google Flights search, calendar, booking, airline/bag filters, one-way, round-trip, multi-city, or open-jaw behavior; when investigating selectiontoken or selectedflights producer-consumer contracts; or when live audit results are slow…

ashaychangwani/imprint · 87 tokens