-
-
Save Ismael-VC/cc0be9005760342fdd7c9f9d6e41108b to your computer and use it in GitHub Desktop.
Julia lang - Read JSON from URL
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
#Importing Requests package | |
Pkg.add("Requests") | |
using Requests.get; | |
import JSON; | |
url = "http://query.yahooapis.com/v1/public/yql?q=select%20DaysRange%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22EBAY%22,%22GOOG%22%29%20&env=http://datatables.org/alltables.env&format=json"; | |
#Reads the data from HTTP URL | |
es = get(url); | |
j = JSON.parse(es.data) | |
#Prints the data from JSON | |
print(j["query"]["results"]["quote"]) | |
for i in (j["query"]["results"]["quote"]) | |
print((i["DaysRange"])) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment