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

@prokopschield/website-screenshot

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prokopschield/website-screenshot

Take a screenshot of a website

  • 0.1.0-5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@prokopschield/website-screenshot

Installation

$ yarn add @prokopschield/website-screenshot

Usage

import { screenshot } from '@prokopschield/website-screenshot';

const preview = await screenshot(
    'url',
    [
        // requested resolutions
        // e.g. { x: 1920, y: 1080 }
    ],
    {
        // options
        // imgFormat: 'jpeg' | 'png' | 'webp'
        // imgQuality: number between 0 and 100 (jpeg/webp)
    }
);

preview.error; // Error | undefined
preview.screenshots; // Map<resolution, Buffer>
preview.screenshots.get('1920x1080'); // screenshot of resolution 1920x1080 if requested, or undefiend
preview.URLs; // set of URLs that were accessed
preview.load_time_ms; // how long the page took to load
preview.size; // how many bytes were actually fetched
preview.html; // page's html after rendering
preview.resources; // Map<URL, Buffer>

Installation (for cli usage)

Please note you must be root (Unix/GNU) or administrator (Windows)

# yarn global add @prokopschield/website-screenshot
# npm i -g @prokopschield/website-screenshot

Usage (cli)

$ website-screenshot PAGE [[-r] resolution] [[-f] format] [[-q] quality] >FILENAME

Keywords

FAQs

Package last updated on 28 Jul 2022

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