New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-batch-screenshots

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-batch-screenshots

Make screenshots of your websites in batch

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Puppeteer-batch-screenshots

Make screenshots of your websites in batch.

Let's say you have to make 100 web page screenshots in a row daily. The most of CLI-enabled screenshot tools allow you to make one single screenshot at a time, which means every time the new Node + Chrome instance gets initialised. This tool saves a good amount of time by batching these tasks.


Tool based on puppeteer.

Installation and Usage:

npm i -g puppeteer-batch-screenshots
puppeteer-batch-screenshots config.json

alternatively you can install it as a local dependency

mkdir my-perfect-screenshoot-tool && cd my-perfect-screenshoot-tool
npm init -y
npm i puppeteer-batch-screenshots
node /node_modules/puppeteer-batch-screenshots/index.js config.json

Example config:

[ // You can put multiple tasks here, each carrying custom settings
  {
    // Viewport width, defaults to 1280
    "width": 1440,
    // Viewport height, defaults to 800
    "height": 900,
    // Whether it shoud make screenshot of the whole page content
    "fullPage": false,
    // Device to emulate, see full list at
    // https://github.com/GoogleChrome/puppeteer/blob/master/lib/DeviceDescriptors.js
    "emulate": "Nexus 4",
    // Auth username and password for HTTP basic auth
    "auth" : "username;password",
    // Number in ms to wait for, or alternatively CSS selector (e.g. ".footer") to wait to appear
    "waitFor": 500,
    // CSS selector of element to take screenshot of
    "element": "#main",
    // Each task can have multiple routes
    "routes": [ 
      {
        // Web page URL
        "url": "http://example.com/1",
        // Output field is being evaluated to enable template literals
        // Supported file extensions: PNG, JPEG/JPG and PDF
        "output": "./screenshots/example-1-${new Date().toISOString()}.png" 
      }
    ]
  }
]

License

This project is licensed under the MIT License

Keywords

FAQs

Package last updated on 07 May 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc