Grabbing Screenshots for a List of URLs
UPDATE: There’s a better tool for this job. View my new post about Pageres.
webkit2png is a great tool for taking automatic screenshots of websites. Here’s the project’s description: “With tall or wide pages that would normally require scrolling, it takes screenshots of the whole webpage, not just the area that would be visible in a browser window.”
Here’s one way to use this tool to grab an entire list of URLs. First, make a file containing URLs, one per line. Next, simply run this (set filename, output directory, and options as needed):
cat my_pages.txt | xargs webkit2png --delay=1 -F -D ~/my_pages_images/
The “-F” argument will grab only a fullsize screenshot. There are many options to control sizing, filenames, scaling, and more. Run webkit2png --help for available options.
The multiple URLs feature isn’t supported anymore (https://github.com/paulhammond/webkit2png/issues/63), hope to save you time trying.