A comand-line utility for taking automated screenshots of websites
For background on this project see shot-scraper: automated screenshots for documentation, built on Playwright.
Full documentation can be found at shot-scraper.datasette.io
Get started with GitHub Actions
To get started without installing any software, use the shot-scraper-template template to create your own GitHub repository which takes screenshots of a page using
shot-scraper. See Instantly create a GitHub repository to take screenshots of a web page for details.
You can install the
shot-scraper CLI tool using pip:
pip install shot-scraper # Now install the browser it needs: shot-scraper install
Taking your first screenshot
You can take a screenshot of a web page like this:
This will create a screenshot in a file called
Many more options are available, see Taking a screenshot for details.
- The shot-scraper-demo repository uses this tool to capture recently spotted owls in El Granada, CA according to this page, and to generate an annotated screenshot illustrating a Datasette feature as described in my blog.
- Ben Welsh built @newshomepages, a Twitter bot that uses
shot-scraperand GitHub Actions to take screenshots of news website homepages and publish them to Twitter. The code for that lives in palewire/news-homepages.
- scrape-hacker-news-by-domain uses