Skip to content

Instantly share code, notes, and snippets.

@shenwei356
Created December 26, 2016 13:41
Show Gist options
  • Save shenwei356/04bc003e0f50399526615c3fff13475f to your computer and use it in GitHub Desktop.
Save shenwei356/04bc003e0f50399526615c3fff13475f to your computer and use it in GitHub Desktop.
save_page.js
var system = require('system');
var page = require('webpage').create();
page.open(system.args[1], function()
{
console.log(page.content);
phantom.exit();
});
http://askubuntu.com/questions/411540/how-to-get-wget-to-download-exact-same-web-page-html-as-browser
phantomjs save_page.js http://example.com > page.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment