Skip to content

Instantly share code, notes, and snippets.

@mmoulton
Last active December 11, 2015 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmoulton/4545203 to your computer and use it in GitHub Desktop.
Save mmoulton/4545203 to your computer and use it in GitHub Desktop.
How to capture screenshots of website using 'crawl' and 'capture'

Install

First install 'crawl' and 'capture'

npm install -g crawl
npm install -g capture

Note: 'capture' requires PhantomJS. I generaly install using homebrew on a Mac.

Crawl Site

You first need to crawl your site and produce a sitemap of every page found within the domain. Use 'crawl' to do this:

crawl -j http://your-site.com > sitemap.json

Capture Screenshots

Next you can capture screenshots using 'capture'

capture -s sitemap.json -o ./output-directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment