Last change
on this file since 39017 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
|
Rev | Line | |
---|
[31525] | 1 | # Find pizza in Mountain View using Yelp
|
---|
| 2 |
|
---|
| 3 | page = require('webpage').create()
|
---|
| 4 | url = 'http://lite.yelp.com/search?find_desc=pizza&find_loc=94040&find_submit=Search'
|
---|
| 5 |
|
---|
| 6 | page.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.