source: other-projects/FileTransfer-WebSocketPair/Themes/themebuilder/bin/phantomjs-1.9.2-macosx/examples/pizza.coffee@ 31525

Last change on this file since 31525 was 31525, checked in by ak19, 7 years ago

Nathan provided more stuff: Themes folder contains Sencha's Themebuilder which generates GXT Themes. It includes the .theme and generated .jar files for the project theme.

File size: 518 bytes
Line 
1# Find pizza in Mountain View using Yelp
2
3page = require('webpage').create()
4url = 'http://lite.yelp.com/search?find_desc=pizza&find_loc=94040&find_submit=Search'
5
6page.open url,
7 (status) ->
8 if status isnt 'success'
9 console.log 'Unable to access network'
10 else
11 results = page.evaluate ->
12 pizza = []
13 list = document.querySelectorAll 'address'
14 for item in list
15 pizza.push(item.innerText)
16 return pizza
17 console.log results.join('\n')
18 phantom.exit()
Note: See TracBrowser for help on using the repository browser.