Created
December 11, 2014 10:03
-
-
Save Eun/bde45fe920a679954e4f to your computer and use it in GitHub Desktop.
phantomjs.sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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