Hi All:
when writing my code for something like current latitude:
import urllib2
import json
f=urllib2.urlopen('http://api.wunderground.com/api/a66b1...)
json_string = f.read()
parsed_json = json.loads(json_string)
location1 = parsed_json ['location']['lat']
I am given the latitude, however when attempting the same with categories such as forecast, tide or astronomy:
sunrise = parsed_json ['sunrise']
print "\nSunrise at: %s" % (sunrise)
I get errors saying sunrise is out of dictionary...is this a wunderground issue or a python issue?
when writing my code for something like current latitude:
import urllib2
import json
f=urllib2.urlopen('http://api.wunderground.com/api/a66b1...)
json_string = f.read()
parsed_json = json.loads(json_string)
location1 = parsed_json ['location']['lat']
I am given the latitude, however when attempting the same with categories such as forecast, tide or astronomy:
sunrise = parsed_json ['sunrise']
print "\nSunrise at: %s" % (sunrise)
I get errors saying sunrise is out of dictionary...is this a wunderground issue or a python issue?