Skip to content

Instantly share code, notes, and snippets.

@Eun
Created December 11, 2014 10:03
Show Gist options
  • Save Eun/bde45fe920a679954e4f to your computer and use it in GitHub Desktop.
Save Eun/bde45fe920a679954e4f to your computer and use it in GitHub Desktop.
phantomjs.sublime-snippet
<snippet>
<content><![CDATA[
var page = require('webpage').create();
page.open('http://${1:url}',
function (status) {
if (status !== 'success') {
console.log('Failed');
} else {
console.log(page.evaluate(function(){return document.body.innerText;}));
}
});
]]></content>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment