Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

shot-scraper

$ shot-scraper Community Med Risk
Simon Willison (simonw) · Browser & Web · Apache-2.0 · macos / linux / windows

shot-scraper wraps Playwright in crisp single-command subcommands: capture PNG screenshots, export PDFs, inspect accessibility trees (accessibility), or run shot-scraper javascript to extract page data directly as JSON.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
brew install shot-scraper
CLI vs MCP Decision Hybrid (CLI + MCP)

Great single-shot CLI for javascript JSON extraction and visual shot verification; use a browser subagent for multi-step stateful UI flows.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Clean javascript and accessibility subcommands emit pure JSON directly to stdout without TUI prompts.

  • shot-scraper javascript and accessibility output JSON to stdout
Trust & Safety 21 / 25

One-shot read/render commands; headless browser executes remote page JavaScript and supports optional --auth context files.

  • Read-only DOM extraction unless -o writes image/PDF locally
Setup & Portability 12 / 15

Easy pip/brew/uvx install, though requires shot-scraper install to fetch Chromium.

  • Python CLI requiring Playwright browser binary download
Utility & Efficiency 14 / 15

Zero-boilerplate replacement for ad-hoc Playwright scripts when capturing screenshots, PDFs, or JSON DOM slices.

  • Single-command screenshot, PDF, accessibility, and JS-to-JSON execution
Maintenance & Lineage 8 / 10

Maintained by Simon Willison (simonw/shot-scraper) under Apache-2.0.

  • simonw/shot-scraper repository
Docs & Verifiability 8 / 10

Well-written documentation at shot-scraper.datasette.io.

  • Official docs at shot-scraper.datasette.io

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Accepts --auth JSON state files, --auth-user/--auth-password, or HTTP headers transiently; stores no credentials by default.

Side Effects
Read-Only Local Write
Cost & Quotas

Free, Apache-2.0 open-source Python CLI; requires Playwright Chromium download.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# shot-scraper Agent Rules
- Run `shot-scraper install` once per environment if Chromium is not yet cached.
- Bound long-running pages with `--timeout <ms>` and avoid passing `--auth` state files to untrusted URLs.

Agent-Ready Command Recipes

Safe Read-Only Queries

Extract structured DOM data as JSON via headless JS
shot-scraper javascript https://example.com "({title: document.title, h1: document.querySelector('h1')?.innerText})"

Loads the page headlessly, evaluates JS, and prints clean JSON to stdout.

Inspect page accessibility tree as JSON
shot-scraper accessibility http://localhost:4321

Dumps the browser's accessibility snapshot as JSON without saving image files.

Controlled Writes & Previews

Capture a selector-scoped screenshot locally
shot-scraper http://localhost:4321 -s '#main' -w 1280 -o preview.png

Renders #main at 1280px width and writes preview.png to disk.

Strengths for Agents

  • + shot-scraper javascript and accessibility return clean JSON without writing any script files.
  • + Zero-boilerplate selector (-s), viewport (-w/-h), and --wait flags for visual checks.

Caveats & Pitfalls

  • ! Requires shot-scraper install (Playwright Chromium ~300 MB) on fresh environments.
  • ! Meant for single-page shots rather than multi-step login/checkout flows.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI