pizza.js: Fantastico!

1.0
Ariya Hidayat 2010-12-26 23:32:51 -08:00
parent 5346072a90
commit 9d7e4b4156
1 changed files with 12 additions and 0 deletions

12
examples/pizza.js Normal file
View File

@ -0,0 +1,12 @@
// Find pizza in New York using Google Local
if (phantom.storage.length === 0) {
phantom.storage = 'pizza';
phantom.open('http://www.google.com/m/local?site=local&q=pizza+in+new+york');
} else {
var list = document.querySelectorAll('div.bf');
for (var i in list) {
phantom.log(list[i].innerText);
}
phantom.exit();
}