I am trying to use Python to get the conditions from the period 1 of the simpleforecast in the forecast feature. I apparently don't know the syntax for pointing to that specific data. What I am trying right now is:
import urllib2
import json
f = urllib2.urlopen('http://api.wunderground.com/api/my_key/forecast/q/TX/Waco.json')
json_string = f.read()
parsed_json = json.loads(json_string)
todayCondition = parsed_json['simpleforecast']['forecastday']['period'][1]['conditions']
print "Conditions for today are %s" % (todayCondition)
f.close()
I know the issue is with the way I am telling python to find the parsed data I want but I don't know how to get the specific conditions for "period": 1