Skip to content

alvinlohtpgit/screenshotcap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshotcap

Simple and straightforward NPM package that calls screenshotlayer webpage capture / screenshot service.

Screenshotcap will accept an url and saves the captured screen onto a directory you have specified.

Installation

npm install screenshotcap [--save]

Before you use this library

Screenshotcap is a API wrapper against the Screenshotcap service.

In order to start using the service, you will need to sign up for an account at ScreenShotLayer.com. After you have registered for an account, you will need to get the API access key from the Dashboard and also fill up the secret key.

Usage for Capture

const screenshotcap = require('screenshotcap');

const opts = {
    url: 'https://twitter.com/AlvinLoh19', // The URL to capture
    pathtowrite: '/some/path/with/filename.png' // The filepath with file name to write to
    accesskey: 'YOUR API ACCESS KEY',
    secretkey: 'YOUR API SECRET KEY',
    viewport: '1400x900' // Optional parameter, will default to 1400x900
};

screenshotcap(opts).then(function(done){
   console.log('Done writing file'); 
});

Things to note

Currently, the library only supports writing to PNG files.

About

NPM package to interface with screenshotlayer web page capture service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published