Skip to content

Instantly share code, notes, and snippets.

@dalmaer
Created April 11, 2011 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalmaer/912917 to your computer and use it in GitHub Desktop.
Save dalmaer/912917 to your computer and use it in GitHub Desktop.
A phantom.js example
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