Contributing

The GitHub repository for this project is simonw/shot-scraper.

To contribute to this tool, first checkout the code. You can use uv to run the tests like this:

cd shot-scraper
uv run pytest

You’ll need to install the Playwright browsers too:

uv run shot-scraper install

Some of the tests exercise the CLI utility directly. Run those like so:

uv run tests/run_examples.sh

Documentation

Documentation for this project uses MyST - it is written in Markdown and rendered using Sphinx.

To build the documentation locally, run the following:

cd docs
uv run --with-requirements requirements.txt make livehtml

This will start a live preview server, using sphinx-autobuild.

The CLI --help examples in the documentation are managed using Cog. Update those files like this:

uv run cog -r docs/*.md

Publishing the release notes

After pushing a release, I use the following to create a screenshot of the release notes to use in social media posts:

shot-scraper https://github.com/simonw/shot-scraper/releases/tag/0.15 \
  --selector '.Box-body' --width 700 \
  --retina

Example post.