Socket
Socket
Sign inDemoInstall

puppeteer-mass-screenshots

Package Overview
Dependencies
68
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    puppeteer-mass-screenshots

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


Version published
Weekly downloads
2.6K
increased by64.11%
Maintainers
1
Install size
6.89 MB
Created
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 for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • 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