Files
gists/codegrab/screen2.js
2022-05-13 12:50:20 +02:00

19 lines
471 B
JavaScript

var page = require('webpage').create(),
url = 'https://mobile.twitter.com/carlomasala1/status/1490645423257706498',
w = 1920,
h = 8000
page.viewportSize = { width: w, height: h }
page.open(url, function(status) {
if (status !== 'success') {
console.log('Unable to load url: ' + url)
} else {
window.setTimeout(function() {
page.clipRect = { top: 0, left: 0, width: w, height: h }
page.render('img.png')
phantom.exit()
}, 20000)
}
})