Skip to content

Instantly share code, notes, and snippets.

@jrpz
Created August 6, 2010 21:58
Show Gist options
  • Save jrpz/512078 to your computer and use it in GitHub Desktop.
Save jrpz/512078 to your computer and use it in GitHub Desktop.
require 'json'
require 'open-uri'
url = 'http://query.yahooapis.com/v1/public/yql?format=json&env=http://datatables.org/alltables.env&callback=cbfunc&q='
query = 'QUERY = SELECT * FROM yahoo.finance.quotes WHERE symbol IN (“YHOO”,“AAPL”,“GOOG”,“MSFT”)'
quri = URI.encode(url + query)
doc = open(quri)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment