Website Screenshots with Gowitness

There are many reasons why you might want to automate website screenshots. I’ve previously attempted to do this with development tools like PhantomJS and Selenium however was left unimpressed. Selenium is hard to setup and PhantomJS had difficulty getting accurate website screenshots.

While searching for a better tool I discovered gowitness a command line tool written in Go

Gowitness fetches accurate images using a real Google Chrome browser in headless mode. Being written it Go means it will run on practically any platform. See their readme for getting started instructions.

Gowitness has built in concurrency

With the following single command I was able to concurrently generate screenshots for over 800 sites in under 18 minutes 👏. This works by feeding in a simple txt file which contains a list of URLs.

gowitness file --source=urls.txt --threads=4 --resolution="1200,750" --log-format=json --log-level=warn --timeout=60 --destination="Desktop/Screenshots/"

This was all just an experiment. That said I am really interested in automating website screenshots for the following two use cases.

  • Thumbnail images to pretty up my website management tool
  • Tracking visual changes over time for troubleshooting purposes