How simonw/shot-scraper works
shot-scraper is a command-line tool for capturing website screenshots, recording browser demos, and extracting page data with JavaScript. A user invokes the CLI with a URL or configuration; it drives a Playwright browser and produces files or data. The CLI also includes workflows for multi-shot YAML configurations and HAR resource extraction. Storyboard models validate video-demo configuration, while utility functions support URL-derived filenames and related conversions. The CLI is a large, central module; the sampled excerpts show only portions of its workflows, so unsampled feature relationships are not expanded.
Main entry points: cli.py CLI commands · video.py Storyboard models · utils.py URL utilities
Components 13
Browser capture
- CLI commands
shot_scraper/cli.py - Playwright browser
- Web pages
- Screenshots
shot_scraper/cli.py - Video demos
shot_scraper/cli.py - Output files
Automation and scraping
- Multi-shot runs
shot_scraper/cli.py - JavaScript scraping
shot_scraper/cli.py - HTML output
shot_scraper/cli.py - HAR extraction
shot_scraper/cli.py
Configuration and utilities
- Storyboard models
shot_scraper/video.py - URL utilities
shot_scraper/utils.py
Other components
- CLI user
Connections 12
- CLI user → CLI commands: invokes
README.md - CLI commands → Playwright browser: drives
shot_scraper/cli.py - Playwright browser → Web pages: captures
README.md - CLI commands → Screenshots: produces
README.md - CLI commands → Video demos: records
README.md - CLI commands → Storyboard models: loads models
shot_scraper/cli.py - CLI commands → Multi-shot runs: runs shots
shot_scraper/cli.py - CLI commands → JavaScript scraping: scrapes with
README.md - CLI commands → HTML output: extracts
shot_scraper/cli.py - CLI commands → HAR extraction: extracts entries
shot_scraper/cli.py - CLI commands → URL utilities: uses
shot_scraper/cli.py - CLI commands → Output files: writes
README.md