Created
April 11, 2011 01:07
-
-
Save dalmaer/912917 to your computer and use it in GitHub Desktop.
A phantom.js example
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
if (phantom.state.length === 0) { | |
phantom.state = 'pizza'; | |
phantom.open('http://www.google.com/m/local?site=local&q=pizza+nyc'); | |
} else { | |
var list = document.querySelectorAll('div.bf'); | |
for (var i in list) { | |
console.log(list[i].innerText); | |
} | |
phantom.exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment