shot-scraper is a tool to automate the process of updating screenshots.


$ python -m pip install shot-scraper
$ shot-scraper install


The second line installs the required browser.


shot-scraper can be used in two ways

  1. …for single screenshots on the command line:

    $  shot-scraper -o ~/Downloads/clean-prep.png

    …or with additional options, e.g. for JavaScript and CSS selectors:

    $ shot-scraper -s '#overview' -o ~/Downloads/clean-prep.png
  2. …for a set of screenshots configured in a YAML file:

    - url:
      output: ~/Downloads/clean-prep.png
    - url:
      width: 736
      quality: 40
      output: example.jpg

    Afterwards shot-scraper multi can be used, for example:

    $ shot-scraper multi shots.yaml
    Screenshot of '' written to '~(Downloads/clean-prep.png'
    Screenshot of '' written to 'example.jpg'

    See also

    • In the file you will find a complete overview of the possible options.

    • In the shot-scraper-demo repository you will find a much more comprehensive shots.yaml file.

GitHub Actions

shot-scraper can be easily integrated into GitHub Actions. The shot-scraper-demo repository also contains an examplary shots.yml. Once a day, two screenshots are created and transferred back to the repository. Note, however, that saving image files that change frequently can make the revision history very unreadable. Therefore, you should use shot-scraper with caution together with GitHub Actions.