Looking for a quick and easy way to capture webpage screenshots from Terminal? Webkit2png is a CLI tool build on Python for Mac OS X that can create a scrolling screenshot of a webpage using the rendering engine in Safari.
Example of the current command to use for OS X El Capitan.
webkit2png -W 1920 http://google.com --ignore-ssl-check
How does it work?
webkit2png
is the primary command once the script is installed-W 1920
is setting the script to render the screenshot at a width of 1920pxhttp://google.com
is the webpage to be rendered as a png--ignore-ssl-check
flag is needed to get webkit2png to work with new app security protocols in OSX Capitan.
If you’re having trouble getting webkit2png to work with OS X El Capitan, read this Github pull request and try the patch. Webkit2png is simply a single python script file, so you can quickly overwrite your current version with the patch until a permanent solution is published.