I have done a program with 2 apis that show forecast and city info of diffrent citys that the user choose. But now I need help cause Im stuck on how to get my make_request, make
Example - I use existing label with title to set information from request
def make_request(self):
r = requests.get("http://api.wunderground.com/api/61418d709872f773/forecast/q/" + self.enterCountry.get() +"/" + self.v.get() +".json")
data = r.json()
for day in data['forecast']['simpleforecast']['forecastday']:
self.var.set( day['date']['weekday'] + ":" + "\n" + "Conditions: " + day['conditions'] + "\n" + "High: " + day['high']['celsius'] + "C " + "Low: " + day['low']['celsius'] + "C" )
return data