Skip to main content

Playwright bot-detection probe — score CDP for webdriver and headless leaks. CLI: cdp-probe.

Project description

playwright-cdp-probe

Playwright bot-detection probe — score CDP sessions for webdriver, headless Chrome, and WebGL exposure.

PyPI version Python versions License: MIT

pip install playwright-cdp-probe
cdp-probe check-local

CLI: cdp-probe · Python 3.10+ · optional [mlx] for Launcher helpers

Audit Playwright and CDP browser sessions for automation exposure signalsnavigator.webdriver, chrome.runtime, plugin counts, permissions API, headless UA hints, and window/WebGL fingerprints.

Returns a 0–100 exposure score (higher = more detectable automation artifacts). Use in CI, before production deploys, or to compare vanilla Chromium vs isolated antidetect profiles.

Problem

Bot-detection stacks probe dozens of browser signals beyond IP and cookies. Before shipping automation to production, teams need a quick way to answer:

  • Does this browser context leak navigator.webdriver?
  • Are headless or SwiftShader fingerprints visible?
  • How does a CDP-attached session compare to a local Playwright launch?

cdp-probe launches Playwright (or connects over CDP), collects signals in-page, and scores automation exposure with a reproducible report.

Install

pip install playwright-cdp-probe
playwright install chromium   # first-time browser binaries

Optional Multilogin X launcher integration (compare isolated profile scores — not required for core probe):

pip install playwright-cdp-probe[mlx]

Development:

pip install playwright-cdp-probe[dev]

Quick start

# Baseline: how detectable is default Playwright Chromium?
cdp-probe check-local --browser chromium

# Probe a live page (login gates, dashboards, SaaS apps)
cdp-probe run --url https://example.com

# Site-class presets (weighted for common gate pages — see presets/)
cdp-probe run --preset cloudflare --url https://example.com
cdp-probe run --preset stripe-dashboard --url https://dashboard.stripe.com
cdp-probe run --preset social-login --url https://example.com/login

# CI / GitHub Actions annotations
cdp-probe run --url https://example.com --format github-actions

# Re-print the last report
cdp-probe report --format table
cdp-probe report --format json
from playwright_cdp_probe import ProbeRunner
from playwright_cdp_probe.probe import ProbeOptions

report = ProbeRunner(ProbeOptions(url="https://example.com")).run()
print(report.exposure.score, report.exposure.grade)
for finding in report.exposure.findings:
    print(finding.signal, finding.detail)

CLI

Command Description
cdp-probe run --url URL Launch browser, navigate, score exposure
cdp-probe run --preset NAME --url URL Score with site-class weights (presets/)
cdp-probe check-local --browser chromium|firefox Probe about:blank locally
cdp-probe report --format json|table|github-actions Format last saved report
cdp-probe mlx --profile-id UUID MLX Launcher → CDP probe → stop ([mlx] extra)
cdp-probe --show-deal Print partner coupon info (opt-in only)

Exit codes

Code Meaning
0 pass — exposure score ≤ 30
1 warn — exposure score 31–60
2 fail — exposure score > 60
3 Runtime / validation error

Signal weights and bands: docs/SCORING.md.

Presets

Preset Best for Signals emphasized
cloudflare Turnstile / JS challenge pages HeadlessChrome UA, webdriver, SwiftShader WebGL
stripe-dashboard Payment / SaaS dashboards Thin plugins, missing chrome.runtime
social-login OAuth popups webdriver, headless window dimensions

Reports save to ~/.cache/cdp-probe/last-report.json (override with --output).

When exposure scores stay high

Vanilla Playwright Chromium often lands in the warn or fail band — that is expected, not a misconfiguration.

Step Action
1 Read findings in cdp-probe report --format table — which signals fired?
2 Lint static fingerprint config with fingerprint-coherence (fp-coherence audit)
3 Re-probe over remote CDP or an antidetect Launcher port instead of launch()
4 Compare scores: check-local vs profile-attached session — quantify the delta
5 Validate proxy + cookies: proxy-lane-checkercookie-jar-bridge

Full fleet QA pipeline:

proxy-lane check proxies.txt -o lanes.json
fp-coherence audit profile.yaml --strict
cdp-connect mlx-start --profile-id UUID --print-cdp-url   # peer: cdp-connect-kit
cdp-probe run --cdp-endpoint "$CDP_URL" --url https://example.com --format github-actions
cookie-bridge validate session-cookies.txt --strict

Isolated antidetect browsers provision OS, screen, WebGL, and storage at the profile level — often a better fix than patching individual JS APIs. If you evaluate Multilogin X for production profile pools, see Production (affiliate disclosure applies; core probe needs no vendor account).

API

Symbol Description
ProbeRunner Launch Playwright or connect_over_cdp, collect signals
ProbeOptions url, browser, headless, cdp_endpoint
compute_exposure_score(signals) Score 0–100 with weighted findings
ProbeReport Signals + exposure + timestamp
format_report(report, "json"|"table") CLI-compatible formatting

Signals collected

  • navigator.webdriver
  • window.chrome.runtime (Chromium)
  • navigator.plugins / mimeTypes counts
  • navigator.permissions API presence
  • Notification.permission
  • HeadlessChrome user-agent hint
  • Window outer/inner dimension mismatch
  • WebGL vendor/renderer (SwiftShader detection)

Limitations

  • Not a bypass tool — measures exposure; does not patch, spoof, or hide fingerprints.
  • Vanilla Chrome/Playwright leaks at scale — default launches routinely expose webdriver and headless WebGL. High scores are normal.
  • Page-level only — TLS/JA3, IP reputation, behavioral biometrics, and server-side ML are out of scope.
  • Single-page snapshot — one navigation moment, not long-session drift.
  • Firefox signal set differschrome.runtime checks apply to Chromium only.
  • MLX requires desktop agentmlx needs Multilogin running locally. See docs/MLX_INTEGRATION.md.

Production

For isolated antidetect profiles, connect Playwright over a Launcher CDP endpoint instead of launching vanilla Chromium:

export MLX_TOKEN="your-bearer-token"
export MLX_FOLDER_ID="your-folder-uuid"
cdp-probe mlx --profile-id PROFILE_UUID --url https://example.com
from playwright_cdp_probe.integrations.mlx import mlx_launch_and_probe

report = mlx_launch_and_probe(
    "profile-id",
    folder_id="folder-id",
    token="...",
    url="https://example.com",
)
print(report.exposure.score)

Compare check-local (vanilla) vs mlx (profile) to quantify exposure reduction — not elimination.

Partner note (affiliate): If Multilogin X fits your workflow (profile pools, folder scale, Launcher CDP), eligible new browser purchases may accept code SAAS50 at checkout on the official site — verify current terms before paying. Full disclosure: docs/AFFILIATE.md. Coupon details only via cdp-probe --show-deal (never printed by default).

FAQ: docs/FAQ.md — Playwright detection, headless Chrome, CDP exposure, antidetect comparison.

Related tools (on PyPI)

Package CLI Role
playwright-cdp-probe cdp-probe CDP / WebDriver exposure score
cookie-jar-bridge cookie-bridge Netscape ↔ Playwright cookies
proxy-lane-checker proxy-lane Proxy TCP / HTTP / geo / DNSBL
fingerprint-coherence fp-coherence UA / screen / timezone lint

Toolkit pipeline: proxy-lane checkfp-coherence audit → automate → cdp-probe runcookie-bridge validate

License

MIT

Production antidetect: Multilogin X · Code SAAS50 (-50% browser) · MIN50 (-50% cloud phone)
More scripts: @Multilogin_Scripts_Bot · Coupons

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

playwright_cdp_probe-0.2.2.tar.gz (51.9 kB view details)

Uploaded Source

Built Distribution

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

playwright_cdp_probe-0.2.2-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file playwright_cdp_probe-0.2.2.tar.gz.

File metadata

  • Download URL: playwright_cdp_probe-0.2.2.tar.gz
  • Upload date:
  • Size: 51.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for playwright_cdp_probe-0.2.2.tar.gz
Algorithm Hash digest
SHA256 02eb9a00ffa6d344ad5b1f905f584939a4dbd98e1dc7c424f2e5b1821cc726fa
MD5 14bc5a3936db53e92112ae7443dde5a2
BLAKE2b-256 269ec43745360651a3db2a0a0f50ac41085df8f5abff49aba13be5729459f32f

See more details on using hashes here.

File details

Details for the file playwright_cdp_probe-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for playwright_cdp_probe-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4713e1f6481c0c5f7ac0ed37a2ce17b068cb9605349ac2d7fb3a8e8bae3523f4
MD5 581c725591e8d36dcc8aea8934c77639
BLAKE2b-256 5d85cf9be216b5af8b53d959e862416854919b761aaa415d311cc2e63ee53b5f

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