Created
October 21, 2012 18:55
-
-
Save iwek/3928084 to your computer and use it in GitHub Desktop.
document json
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
//phantomjs | |
var page = require('webpage').create(); | |
var url = 'http://instagram.com/'; | |
page.open(url, function (status) { | |
var js = page.evaluate(function () { | |
return document; | |
}); | |
console.log(JSON.stringify(js)); | |
phantom.exit(); | |
}); | |
//casperjs | |
var casper = require('casper').create(); | |
var url = 'http://instagram.com/'; | |
casper.start(url, function() { | |
var js = this.evaluate(function() { | |
return document; | |
}); | |
this.echo(JSON.stringify(js)); | |
}); | |
casper.run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment