CLI
WebSkrap installs the webskrap command.
Install browsers
webskrap install
webskrap install --format jsonwebskrap install downloads the Chromium browsers used by Playwright and
Patchright. Use JSON output in scripts.
Check environment
webskrap doctor
webskrap doctor --format jsonThe CLI fetch command uses headless Patchright stealth mode, so doctor
checks that Patchright can launch headless Chrome.
List profiles
webskrap profiles
webskrap profiles --format jsonFetch a page
webskrap fetch https://example.comThe default human output prints status, final URL, title, and artifact paths.
For LLMs and shell automation, use JSON:
webskrap fetch https://example.com --format json --max-chars 12000JSON output includes url, final_url, status, ok, title, headers,
text, text_length, text_truncated, and elapsed_ms.
Text and stdout
Print raw fetched content to stdout:
webskrap fetch https://example.com --stdoutReturn readable body text instead of HTML:
webskrap fetch https://example.com --stdout --text-only
webskrap fetch https://example.com --format json --text-onlySuppress the human summary when writing artifacts:
webskrap fetch https://example.com --quiet --output example.htmlScreenshot and output
webskrap fetch https://example.com --screenshot example.png
webskrap fetch https://example.com --output example.html
webskrap fetch https://example.com -o example.html --screenshot example.pngParent directories are created automatically for --output and --screenshot.
Wait and timeout
webskrap fetch https://example.com --wait-until load --timeout-ms 60000Supported wait states are commit, domcontentloaded, load, and
networkidle. Prefer domcontentloaded for fast HTML collection, load for
regular page assets, and networkidle only when a page actually needs a quiet
network.
Resource policy
webskrap fetch https://example.com --resource-policy lite
webskrap fetch https://example.com --resource-policy documents -o page.htmllite blocks images, fonts, and media. documents also blocks stylesheets.
Headless Patchright controls
webskrap fetch always runs headless Patchright. Use real Chrome and a stable
profile directory when browser continuity matters:
webskrap fetch https://example.com \
--channel chrome \
--user-data-dir .webskrap/headless-profile \
--mask-headless-user-agentFor fingerprint-statistics or WebRTC leak-test pages, apply profile locale/timezone/media metadata and block non-proxied WebRTC UDP candidates without viewport, user-agent, or JavaScript patches:
webskrap fetch https://amiunique.org/fr/fingerprint \
--channel chrome \
--mask-headless-user-agent \
--patchright-context-profile \
--reduce-fingerprint-surface \
--webrtc-ip-handling-policy disable_non_proxied_udpPass additional browser flags with repeated --launch-arg=... options. Use the
equals form when the browser flag itself starts with --.
webskrap fetch https://example.com \
--launch-arg=--no-first-run \
--launch-arg=--no-default-browser-check