Shot-scraper

Latest version: v1.8

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 6

0.8

- `shot-scraper` can now take screenshots of local files on disk: [35](https://github.com/simonw/shot-scraper/issues/35)

shot-scraper index.html -o index.png

- If you call `shot-scraper` on a URL with no protocol, `http://` will be assumed. Redirects will be followed:

shot-scraper datasette.io -o datasette.png

0.7

- The `shot-scraper shot` and `shot-scraper pdf` commands both now default to writing a file to disk if no filename is specified, using a name derived from the URL. If you want to write the PNG or PDF content to standard output you can do so using `-o -`. [32](https://github.com/simonw/shot-scraper/issues/32)
- New `--retina` flag for `shot-scraper shot` and `shot-scraper multi` which causes the screenshot to be taken with a device scale factor of 2. [33](https://github.com/simonw/shot-scraper/issues/33)
- `shot-scraper shot --devtools` option opens an interactive browser window with the browser developer tools enabled. [34](https://github.com/simonw/shot-scraper/issues/34)

0.6

- Now supports taking screenshots of **pages that require authentication**. [18](https://github.com/simonw/shot-scraper/issues/18)

The following command will open a browser window for the specified website, wait for you to manually authenticate and hit `<enter>` in the terminal, and then write the resulting authentication context out to `auth.json`:

shot-scraper auth https://github.com/ auth.json`

You can then take authenticated screenshots like this:

shot-scraper https://github.com/notifications \
--auth auth.json -o notifications.png

The `-a/--auth` option is also supported by the `multi`, `pdf` and `accessibility` commands.

- The `shot-scraper` command can now open a browser in which you can **interact with a page** before the screenshot is taken: [31](https://github.com/simonw/shot-scraper/issues/31)

shot-scraper https://simonwillison.net/ \
-o after-interaction.png \
--height 800 --interactive

This will output:

Hit <enter> to take the shot and close the browser window:
And after you hit <enter>...
Screenshot of 'https://simonwillison.net/' written to 'after-interaction.png'

- You can now pass **multiple CSS selectors** in order to take a screenshot of the smallest area that encompasses all of the content referenced by those selectors: [21](https://github.com/simonw/shot-scraper/issues/21)

shot-scraper https://simonwillison.net/ \
-s 'bighead' -s .overband \
-o bighead-multi-selector.png

Add `--padding 20` to include an additional 20px of padding around the specified area.

The YAML format used by `snap-shotter multi` also now supports multiple CSS selectors, which look like this:

yaml
- output: bighead-multi-selector.png
url: https://simonwillison.net/
selectors:
- "bighead"
- .overband
padding: 20


- Scripted tests can now be run using `tests/run_examples.sh` [29](https://github.com/simonw/shot-scraper/issues/29)

0.5

- New `shot-scraper pdf` command for creating a PDF export of a web page. [24](https://github.com/simonw/shot-scraper/issues/24)
- `shot-scraper accessibility --javascript` option for executing custom JavaScript before taking the accessibility snapshot. [23](https://github.com/simonw/shot-scraper/issues/23)
- `shot-scraper accessibility -o filename.json` option. [25](https://github.com/simonw/shot-scraper/issues/25)
- README demos section now links to `newshomepages` Twitter bot by [palewire](https://github.com/palewire)
- README now includes tips on executing JavaScript. [20](https://github.com/simonw/shot-scraper/issues/20)
- README now includes the `--help` output of the various commands.

0.4

- Added `shot-scraper accessibility URL` command, which dumps out a JSON copy of the Chromium accessibility tree for the page. [22](https://github.com/simonw/shot-scraper/issues/22)
- Fixed error in the `--help` output for the `shot-scraper multi` command.

0.3

- Added a live demo, in the [shot-scraper-demo](https://github.com/simonw/shot-scraper-demo) repository. [#14](https://github.com/simonw/shot-scraper/issuse/14)
- New `--quality 80` option for outputting smaller JPEG images with the specified quality. [15](https://github.com/simonw/shot-scraper/issuse/15)
- New `--wait 2000` option for waiting the specified number of milliseconds before taking the screenshot. [16](https://github.com/simonw/shot-scraper/issuse/16)

Page 5 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.