node-proshot
Handy tool to capture website screenshots using Puppeteer.
Installation
$ npm install node-proshot
Usage
const proshot = ;
Take a screenshot for a website
proshot;
The CONFIG
have following properties:
timeout
: duration to wait for AJAX loading to complete. Default to 5000 milliseconds.viewport {width, height}
: the viewport to take screenshot. Default: 1280x720.
For examples:
proshot; proshot; proshot;
Take screenshots for multiple websites at a time
proshot;
URL_ARRAY
: the array of websites, should start with eitherhttp
orhttps
.DIRECTORY_TO_SAVE
: this should be the folder where screenshots are stored. Default: directory where script is executed.CONFIG
: have following properties:viewport
: viewport to take screenshots. Default: 1280x720.timeout
: duration to wait for AJAX loading to complete. Default to 5000 milliseconds.extension
: image file types. It could bejpg
orpng
.
Examples:
proshot; proshot; proshot;