0.0.3 • Published 6 years ago

puppeteer-webshots v0.0.3

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
6 years ago

Puppeteer Webshots

Example

const {PuppeteerBrowser, PuppeteerWebshots} = require('puppeteer-webshots');

let browser = new PuppeteerBrowser({maxPages: 2});
let screenshots = new PuppeteerWebshots(browser);

screenshots.timedScreenshots(
	'http://myurl.com',
	{width: 1920, height: 1080},
	[1000, 2000, 4000, 20000]
)
.then(() => console.log("DONE"))
.catch((error) => console.error(error));

// Cancel it manually
setTimeout(function() {
	screenshots.cancel();
}, 20000);

screenshots.on('screenshot', function({time, screenshot}) {
	console.log(time, screenshot);
});
0.0.3

6 years ago

0.0.2

6 years ago