How to enter Weather Underground forecast icons

0

Good afternoon

I'm trying to insert the Weather Underground icons but the icons do not appear in Python 3. Below I leave a part of the code.

url = "http://api.wunderground.com/api/api_Key/forecast/lang:PT/q/PT/Lisbon.json"

temp = urllib.request.urlopen(url)

json_string = temp.read()

parsed_json = json.loads(json_string)

ico = parsed_json['forecast']['simpleforecast']['forecastday'][0]['icon']

img = PhotoImage(ico)

label1 = Label(window, image=img)

label1.image = img

label1.pack()

Thanks for the help

    
asked by anonymous 20.05.2017 / 18:10

0 answers