Created
September 19, 2017 14:54
-
-
Save TerryMooreII/39d2c9aa30650370ab9b31f88c5a28c5 to your computer and use it in GitHub Desktop.
Screen shot website to base64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webshot = require('webshot'); | |
const streamToPromise = require('stream-to-promise') | |
var stream = webshot('www.google.com', { | |
screenSize: { | |
height:480, | |
width:600 | |
} | |
}); | |
streamToPromise(stream).then(data => console.log(data.toString('base64'))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment