Shot Scraper – How to automate website screen capture?

Here is an interesting command-line tool that allows you to automate the screen capture of websites. Shot Scraper thus makes it possible to immortalize what is on a web page.

But the tool does not stop there since it offers many options to adjust the size of the image, or to capture only a specific area of ​​the page by relying on CSS selectors.

shot-scraper -o small.png --width 400 --height 800
shot-scraper -s '#main'

The tool is perfectly capable of capturing sites that require authentication and can also use JavaScript in the pages before capturing, which allows to retrieve only the returned text content.

shot-scraper javascript "({
  title: document.title,
  tagline: document.querySelector('.tagline').innerText

The output can be in PNG or JPG and a Retina option allows you to double the resolution of an image if necessary. Shot-Scraper even allows you to interact with the page before taking the screenshot, so you can have exactly what you want on the screen.

To install shot-scraper:

pip install shot-scraper
shot-scraper install

Shot-Scraper is designed to work with Chromium but you can also use it with Firefox or Webkit (Safari’s engine) like this:

shot-scraper install -b firefox

To discover urgently here + the doc here.

5/5 - (9 votes)


is Senior Writer DZ-TECH, where he covers the world of technology, hacking, cybersecurity, surveillance and privacy.

Leave a Comment