Skip to content

Instantly share code, notes, and snippets.

@lislon
Created February 12, 2015 07:52
Show Gist options
  • Select an option

  • Save lislon/4625a9af1c92117a9da6 to your computer and use it in GitHub Desktop.

Select an option

Save lislon/4625a9af1c92117a9da6 to your computer and use it in GitHub Desktop.
var page = require('webpage').create();
page.onResourceRequested = function(request) {
console.log('Request ' + JSON.stringify(request.url, undefined, 4));
};
page.onResourceReceived = function(response) {
//console.log('Receive ' + JSON.stringify(response.url, undefined, 4));
};
page.open('http://local.ros-dengi.ru', function(status) {
console.log("Status: " + status);
if(status === "success") {
page.render('example.png');
}
phantom.exit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment