page.open(url, function (status) {
if (status !== 'success') { console.log('Unable to access network');
} else {
var html = page.evaluate(function() {
return document.innerHTML; // <- get all generated and styled HTML
}); console.log(html);
}
phantom.exit();
});
There is a similar project for Gecko called offscreen but I can't see how it's possible to get the generated HTML with this though.
Project Page: http://offscreengecko.sourceforge.net/
Source code: http://hg.mozilla.org/incubator/offscreen/
Well, the example also does that. As does this: http:// code.google. com/p/phantomjs /wiki/QuickStar t#DOM_Manipulat ion but it might not be so clear. 'webpage' ).create( ), lite.yelp. com/search? find_desc= pizza&find_ loc=94040& find_submit= Search';
This is the interesting bit:
var page = require(
url = 'http://
page.open(url, function (status) {
console. log('Unable to access network'); function( ) {
console. log(html) ; offscreengecko. sourceforge. net/ hg.mozilla. org/incubator/ offscreen/
if (status !== 'success') {
} else {
var html = page.evaluate(
return document.innerHTML; // <- get all generated and styled HTML
});
}
phantom.exit();
});
There is a similar project for Gecko called offscreen but I can't see how it's possible to get the generated HTML with this though.
Project Page: http://
Source code: http://