This commit is contained in:
Talor Berthelson
2016-06-28 01:44:31 -04:00
parent 0f22edd5d2
commit 4b07d51b90

11
app.js
View File

@@ -26,15 +26,8 @@ stream.on('tweet', function (tweet) {
var trumptweeturl = 'https://twitter.com/a__robot/status/' + nameID; var trumptweeturl = 'https://twitter.com/a__robot/status/' + nameID;
console.log(trumptweeturl); console.log(trumptweeturl);
var s = screenshot(trumptweeturl) var s = Screenshot(trumptweeturl).width(800);
.width(500) console.log(s);
.height(500)
.clip()
.capture(function(err, img) {
if (err) throw err;
fs.writeFileSync('./pics/trump.png', img);
console.log('screenshot saved as trump.png');
});
var trumpmessages = session.object.trumpmessages; var trumpmessages = session.object.trumpmessages;
var randomtrumpmessage = trumpmessages[Math.floor(Math.random() * trumpmessages.length)]; var randomtrumpmessage = trumpmessages[Math.floor(Math.random() * trumpmessages.length)];