
Security News
/Company News
Securing the Financial Frontier: How Capital One Uses Socket for Open Source Security
Capital One is partnering with Socket to proactively secure its open source supply chain.
node-screenshot-machine
Advanced tools
Simple node.js wrapper for Screenshot Machine's API.
Screenshot Machine provides a very simple url-based API, with config options passed as optional url params. This library provides a convenient, node-ish wrapper that makes using Screenshot Machine in your node app a snap.
Run npm install node-screenshot-machine
or git clone then npm install
Optionally run unit tests: npm test
Initializing the node-screenshot-machine module is simple:
var screenshot = require('node-screenshot-machine')({
key: ***** // your screenshotmachine API key
});
Capturing a website screenshot is also simple:
screenshot.get(options, callback);
The module handles standard callback-style invocation:
screenshot.get({
url: 'www.test.com'
},
function(err, result){
if (err) {
// handle error
}
// handle result
});
as well as promise-style:
screenshot.get({
url: 'www.test.com'
})
.then(function(result){
// handle result
})
.catch(function(err){
// handle error
});
These are all the options supported by the .get method (complete details can be found in Screenshot Machine's API guide):
Required
Optional
Note that the screenshot.get method optionally supports streaming the captured image directly to any writable stream using the optional writeStream option:
var imageFileStream = require('fs').createWriteStream('siteImage.png');
screenshot.get({
url: 'www.someurl.com',
format: 'PNG',
writeStream: imageFileStream
});
MIT
Copyright © 2015 Level Seven
FAQs
Simple node.js wrapper for Screenshot Machine's API
The npm package node-screenshot-machine receives a total of 2 weekly downloads. As such, node-screenshot-machine popularity was classified as not popular.
We found that node-screenshot-machine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.