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

web-page-screenshot

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-page-screenshot

Screenshot Module using ShrinkTheWeb API

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Web Page Screenshot module for NodeJS

NOTE: This is NOT a working module yet. It is just a concept placeholder and will be developed as time permits or demand increases. If you are interested in this module, please let us know and we will bump it up in priority. Feel free to contribute to its development! :)

This module lets you easily use the ShrinkTheWeb APIs in node.js to create screenshots of web pages. You will need an api and secret key once you register and login: http://www.shrinktheweb.com/user/register

Installation

Using npm:

npm install web-page-screenshot

You can also clone this repository into your node_modules directory.

Examples

Take a screenshot

var shrinktheweb = require('web-page-screenshot');
var screenshot = new shrinktheweb('your_access_key', 'your_secret_key');

web-page-screenshot.screenshot('http://www.google.com', 'google.jpg').on('close', function(file){
	if (file) {
		console.log('The file ' + file + ' was written correctly');
	} else {
		console.log('Error');
	}
});

Available methods

screenshot

Take a screenshot

You can pass a list of options to this method to customize the API call to Snapito. Here is a list of them:

  • screen: the screen size (viewport): 1024x768 (default: 1024x768)
  • size: the size of the screenshot: 320x200, 200x150, 120x90, 100x75, 90x68, 75x57 (default: 120x90)
  • cache: How old in seconds the screenshot could be. 0 means indefinetly old (default: 0)

Custom screen sizes require "Custom Browser Resolution" upgrade.

Custom screenshot image sizes require "Full-Length" upgrade.

The cache option is not yet supported.

Keywords

FAQs

Package last updated on 09 Jun 2016

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