Skip to main content

WebSkrap logo

WebSkrap

Async-first Python scraping on Playwright, with persistent sessions, resource routing, Patchright stealth, web search, a CLI, and an MCP server for agents.

WebSkrap version on PyPI Python 3.11 or newer Playwright 1.49 or newer Apache 2.0 License

Install

pip install webskrap
webskrap install

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 DataDome and Cloudflare challenge pages raise blocked; WebSkrap does not retry or solve them. Ordinary HTTP errors still return ok=False.

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

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 2.13.0

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 2.13.0
File Size Uploaded
webskrap-2.13.0.tar.gz 276.5 kB Details

Built distribution (wheel)

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

Total release size: 384.9 kB

Release files / webskrap-2.13.0.tar.gz

Download URL webskrap-2.13.0.tar.gz
Size 276.5 kB
Tags Source
SHA-256 checksum
How to use checksums
db04b960275c727d540576ca546b22ee14660143cac0ad0f7098f06fe992dab2
BLAKE2b-256 checksum
How to use checksums
2ee36029b6a5778433537342f724a92d704cb28ec8745128405d1ad78f6ccd8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 1, 2026.

Transparency log

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

Download URL webskrap-2.13.0-py3-none-any.whl
Size 108.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e938817482c8528abbfe3bd0c7250adf70fd6dd22c388bdb3d270d464dc832c6
BLAKE2b-256 checksum
How to use checksums
6f83edd5309d91b693ef095e9ab0b7b40541736c6ce02cb1aa0cede00c4c2009
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 1, 2026.

Transparency log

Release history Release notifications | RSS feed

2.13.1

2 release files

This release

2.13.0 This release

2 release files

2.12.0

2 release files

2.11.0

2 release files

2.10.1

2 release files

2.10.0

2 release files

2.9.0

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.10.1

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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