Is it possible to get the raw html from a webpage using PhantomJS, before any javascript is executed.
The following script is returning the html after all scripts are loaded and executed.
var webPage = require('webpage');
var page = webPage.create();
page.open('http://stackoverflow.com', function (status) {
var content = page.content;
console.log('Content: ' + content);
phantom.exit();
});
Is there a way to access also the initial source of the page?