Skip to main content

WebSkrap logo

WebSkrap

Async-first Python scraping on its own Chrome DevTools Protocol client, with persistent sessions, resource routing, stealth defaults, web search, a CLI, and an MCP server for agents.

WebSkrap version on PyPI Python 3.11 or newer Apache 2.0 License

Install

pip install webskrap
webskrap install

webskrap install downloads Chrome for Testing. WebSkrap drives it through its own CDP client, with no Playwright. Upgrading from 2.x? Read the migration guide.

Quickstart

import asyncio

from webskrap import WebSkrapClient


async def main() -> None:
    async with WebSkrapClient() as client:
        result = await client.fetch("https://example.com")
        print(result.status, result.title)
        print(result.text[:200])


asyncio.run(main())

For deferred content, pass ready_selector="#content" to a Python fetch or --ready-selector '#content' to CLI fetch. Both MCP fetch tools accept ready_selector too. The selector must become visible after consent dismissal. Known challenge pages (DataDome, Cloudflare, Akamai, AWS WAF) and provider block pages (DataDome, Cloudflare, Akamai) raise blocked. WebSkrap waits for device checks that reload the page. It does not retry refusals or solve CAPTCHAs. Ordinary HTTP errors still return ok=False.

For manual CAPTCHA completion, open a persistent browser with webskrap browser open --headed --session manual --proxy http://localhost:8888 URL. Complete the check in that browser. Keep the same session, profile, and proxy for later commands. On a remote host, use a desktop connection to its display. virtual_display=True alone does not provide a remote desktop.

Keep profile_mode="native" for the browser's own identity. On Linux with Xvfb, virtual_display=True runs a headed browser without a visible desktop window. Full profile emulation is useful for device tests, but cannot replace every worker or iframe value. See the identity limits.

A search loads the engine's results page in the same stealth browser and returns the organic hits. Click-tracking redirects are unwrapped, so each url is the destination itself. Bing is the default; use engine="ddg" for DuckDuckGo's HTML endpoint. Google is not offered.

async with WebSkrapClient() as client:
    result = await client.search("example domain", max_results=5)
    for hit in result.hits:
        print(hit.title, hit.url)
webskrap search "example domain" --engine ddg --max-results 10 --format json

When an engine distrusts the exit address it serves a bot challenge. That comes back as a blocked error, not as zero hits. Switch engine, reuse a persistent profile, or change the exit IP. WebSkrap does not retry and does not solve CAPTCHAs.

Visual browser interaction

Agents can see the rendered viewport and interact by coordinates, including canvas and controls missing from the accessibility tree. MCP browser_view returns a PNG image directly; browser_mouse clicks, moves, scrolls, or drags. browser_insert_text inserts literal text into the focused control.

webskrap browser open https://example.com
webskrap browser view viewport.png --format json
# Open the returned PNG with your agent's image viewer, then choose coordinates.
webskrap browser mouse click 120 80
webskrap browser insert-text "hello"
webskrap browser press Enter
webskrap browser view viewport.png --format json
webskrap browser close

Coordinates are CSS pixels from the original image's top-left. Take a fresh view after scrolling or page changes. Headless Chromium needs no Xvfb for this; the agent's client and model must support image input.

Documentation

The agent skill is available at .agents/skills/webskrap/SKILL.md, .claude/skills/webskrap/SKILL.md, and .codex/skills/webskrap/SKILL.md. The file lives in .agents/skills/webskrap/. The .claude and .codex folders link to it, and every folder links to the root references/. The checkout must support symbolic links. On Windows, enable Developer Mode and Git's core.symlinks before cloning.

Security

Persistent browser sessions keep Chromium's OS sandbox, store their profiles 0700, and confine MCP screenshot output to ./webskrap-output. See SECURITY.md for the security model and how to report a vulnerability, and CHANGELOG.md for what changed.

Contributing

See CONTRIBUTING.md for setup, checks, and pull request expectations.

Metadata

Release files for webskrap 3.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webskrap 3.2.2
File Size Uploaded Provenance Actions
webskrap-3.2.2.tar.gz 388.2 kB With provenance Details for webskrap-3.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for webskrap 3.2.2
File Interpreter ABI Platform Actions
webskrap-3.2.2-py3-none-any.whl Python 3 none any Details for webskrap-3.2.2-py3-none-any.whl

Total release size: 562.0 kB

Release files / webskrap-3.2.2.tar.gz

Download URL webskrap-3.2.2.tar.gz
Size 388.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3522370d4cd50ea05b8f7685e36c6f15ad0f112585ac3eab1ea8c4d458a6c037
BLAKE2b-256 checksum
How to use checksums
4401e291bcf318ba04c78620ad755f5ea74325f5a600774851afaeeeffe70aed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / webskrap-3.2.2-py3-none-any.whl

Download URL webskrap-3.2.2-py3-none-any.whl
Size 173.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d583f3024fcc7151dfc12fa7a1f318ee7ec04c9094591677b56c056b6bc83c8
BLAKE2b-256 checksum
How to use checksums
91d79b80a5ae0840510a068e08cb00cbee61692beaf5af0af41286c596d1ac4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for webskrap 3.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for webskrap-3.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.2.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page