Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

puppeteer-mass-screenshots

Package Overview
Dependencies
2
Maintainers
1
Versions
16
Issues
File Explorer

Advanced tools

puppeteer-mass-screenshots

This package creates massive amount of screenshots automatically, using Chrome API screencast,

    1.0.15latest
    GitHub

Version published
Maintainers
1
Weekly downloads
946
decreased by-19.69%

Weekly downloads

Readme

Source

puppeteer-mass-screenshots

Prerequisites | Installation | Manual | InitOptions | StartOptions | FAQ

Puppeteer mass screenshots is a simple Puppeteer's plugin to create automatic screenshots for every new frame appears in the browser.

Why

Unlike the regular screenshots function supplied by Puppeteer, our plugin runs on Chrome's API and doesn't affect Puppeteer's run time.

So basically by using this plugin, you'll be able to create very fast screenshots, and it won't slow your run time

Prerequisites

In order to use this plugin:

  • Puppeteer must be installed.
  • Pupepteer's page object must be created.

Installation

To install the plugin to your project please use:

npm install puppeteer-mass-screenshots

You'll probably prefer to add it to your package.json file so you can use:

npm install --save-prod puppeteer-mass-screenshots

Manual

Once Puppeteer mass screenshots is installed, you can require it in your project:

const PuppeteerMassScreenshots = require('puppeteer-mass-screenshots');

In your constructor create:

const screenshots = new PuppeteerMassScreenshots();

After you have page object

await screenshots.init(page, screenshotsPath);
  • page - Puppeteer page object (related to the browser).
  • screenshotsPath - where to save the created images

To start the automatic screenshots:

await screenshots.start();

To stop the automatic screenshots:

await screenshots.stop();

Important - call screenshots.stop before browser is closed.

FAQ

Does it support Chrome in headless mode?

Yes, it does.

it supports Chrome in headless / headful mode.


Does it support redirections in pages?

Yes, it does.

This plugin is based on Chrome's API,

which isn't affected by page's redirections.


Does it use the window object?

No, it doesn't use the window object.


Can I run this plugin with my own page/browser objects?

Yes.

put the page object in the init function, and the plugin will use it.


Will it change my browser/page/window objects?

No, it won't.

We use Chrome's API only.


How can I use this plugin to record video of my headless Chrome?

Check out Puppeteer video recorder

It uses our plugin, to save screenshots,

And uses ffmpeg to convert these screenshots to a video


Other options to configure [ optional ]

init options - see our Init options page

start options - see our Start options page

Keywords

FAQs

Last updated on 30 Dec 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc