mirror of https://github.com/vitalif/phantomjs
pizza.js: Fantastico!
parent
5346072a90
commit
9d7e4b4156
|
@ -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();
|
||||||
|
}
|
Loading…
Reference in New Issue