Skip to content Skip to sidebar Skip to footer

Phantom Capture Https Webpage

I use phantomjs to capture a https webpage, but the resulting image is a whole black image. How do I fix it or does it mean phantomjs can't capture an https webpage? code like this

Solution 1:

Render your image in png, it will solve your problem.

var webpage = require('webpage');
var page = webpage.create();

page.open('https://twitter.com/JavaScriptDaily',function(status){    
    page.render('twitter.png', {format: 'png'});   
    phantom.exit();
});

Post a Comment for "Phantom Capture Https Webpage"