API Reference

Full typed signatures and docstrings live in the source. Browse them on GitHub.

WebSkrap's public surface is re-exported from the top-level webskrap package.

Client and sessions

SymbolDescription
WebSkrapClientOwns the Playwright lifecycle. Use it as an async context manager and call fetch() for one-shot requests or session() for persistent contexts.
WebSkrapSessionA persistent browser context kept open across requests. Exposes fetch(), human_click(), and the underlying Playwright context.
FetchResultResult of a fetch: url, final_url, status, ok, headers, text, title, cookies, timings, and screenshot_path.

Configuration

SymbolDescription
SessionConfigPer-session or per-call settings: driver, channel, headless, timeouts, user_data_dir, storage_state, resource_policy, proxy, and stealth options.
ProxyConfigProxy server with optional username and password.
ResourcePolicyRequest-blocking preset: ALL, LITE, or DOCUMENTS.
WebRtcIPHandlingPolicyAllowed WebRTC ICE policy values: default, default_public_and_private_interfaces, default_public_interface_only, disable_non_proxied_udp.

Profiles

SymbolDescription
BrowserProfileBrowser-visible settings: viewport, screen, locale, timezone_id, navigator_languages, headers, and device characteristics. Keeps Accept-Language coherent.
ViewportA width / height pair used for viewport and screen dimensions.
get_profile(name)Return a copy of a built-in profile (desktop-chrome, desktop-edge, mobile-chrome).
list_profiles()List the built-in profiles.