Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-screenshot-cli

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-screenshot-cli

Simple wrapper around Puppeteer to take screenshot from command line

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Puppeteer screenshot CLI

Simple wrapper around Puppeteer to take screenshot from command line.

Usage

npm i [-g] puppeteer-screenshot-cli

puppeteer-screenshot --url 'http://perdu.com' --selector 'h1' --output ./perdu.jpg
puppeteer-screenshot -u 'http://perdu.com' -s 'body' -o - > /tmp/perdu.jpg
puppeteer-screenshot 'http://perdu.com' > perdu.jpg

Options

  Headless screenshot with Puppeteer

    -u, --url string        URL to navigate page to. The url should include scheme, e.g. https://.

    -o, --output string     The file path to save the image to. If path is a relative path, then it is
                            resolved relative to current working directory. If no path is provided, the
                            image won't be saved to the disk.

    -s, --selector string   A CSS selector of an element to wait for.
                            Default: body

    -t, --type string       Specify screenshot type, can be either jpeg or png.
                            Default: png

    -q, --quality number    The quality of the image, between 0-100. Not applicable to png images.

    -w, --width number      Viewport width in pixels
                            Default: 800

    -h, --height number     Viewport height in pixels
                            Default: 600

    --timeout  number       Maximum time to wait for in milliseconds.
                            Default: 30000

    -f, --fullPage          When true, takes a screenshot of the full scrollable page.
                            Defaults: false.

    --headless              Whether to run browser in headless mode.
                            Default: true

    -?, --help              This help

See also

Keywords

FAQs

Package last updated on 29 Jan 2021

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