Skip to content

Instantly share code, notes, and snippets.

@suxue
Created March 11, 2014 04:51
Show Gist options
  • Save suxue/9479684 to your computer and use it in GitHub Desktop.
Save suxue/9479684 to your computer and use it in GitHub Desktop.
simple phantomjs usage
var page = require('webpage').create();
page.open
page.open('http://example.com', function(status) {
var x = page.evaluate(function() {
return "-" + window.document.title + '-';
});
console.log(x);
phantom.exit(0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment