Created
November 12, 2010 04:40
-
-
Save Busta117/673733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def algo(env) | |
data_raw = open('http://spreadsheets.google.com/tq?key=0AsTunpthKrMxdEp5R1loYjBBcVhNQWVEc1BUZmZ1QUE&pub=1') | |
data = data_raw.read | |
data = data.split('(')[1].split(")")[0] | |
data = data.gsub("'", '"') | |
data = data.gsub(/([a-z]+):/, '"\1":') | |
result = JSON.parse(data) | |
puts "\n\n\n" | |
puts "\n\n\n" | |
puts"\n\n\n\n" | |
puts result["table"]["rows"][0]["c"].inspect | |
puts "\n\n\nchao" | |
[200, {"Content-Type" => "text/plain"}, "alohaaa"] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment