aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/movies.coffee
blob: 86fb5b0c16e506eafb2fde98428ae6d0a4b6bd78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# List movies from kids-in-mind.com

window.cbfunc = (data) ->
  globaldata = data
  list = data.query.results.movie
  for item in list
    console.log item.title + ' [' + item.rating.MPAA.content + ']'
  phantom.exit()

el = document.createElement 'script'
el.src =
"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20movies.kids-in-mind&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=window.cbfunc"
document.body.appendChild el