WebSkrap
Python Web Scraping with Playwright and Patchright
WebSkrap is an async-first Python web scraping and browser automation toolkit for scraping JavaScript-heavy pages, managing persistent browser sessions, and exposing clean page text to LLM agents through MCP.
Fetch a page in one call, or keep a browser open across calls and drive it with snapshots, clicks, and form fills from the CLI or an MCP client.
pip install webskrap
webskrap install
webskrap fetch https://example.com --format json --max-chars 12000Browser automation ready for agents and scripts
Async-first
Built on Playwright with an async API for concurrent data collection workflows.
Browser profiles
Coherent desktop and mobile profiles keep viewport, user agent, and locale consistent.
Persistent sessions
Reuse cookies, storage, and a user data dir across fetches to stay logged in between runs.
Resource routing
A resource policy blocks images, fonts, and trackers to make pages load faster and leaner.
Patchright stealth
Patchright ships with WebSkrap for stealth-oriented sessions and CLI fetches.
Human-like clicks
human_click moves the cursor along a Bezier curve with eased spacing before the click.
MCP server
fetch and stealth_fetch return clean page text to Claude, Codex, and any MCP agent. browser_* tools drive a live session.
Built for LLMs
Clean-text output by default, 5-10x fewer tokens than raw HTML, plus JSON and bounded CLI output.
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)
print(result.title)
print(result.text[:200])
asyncio.run(main())