0

how to solve this it says No module named 'urllib.urlopen'

import urllib import json import urllib import urllib.urlopen api_endpoint = "http://api.openweathermap.org/data/2.5/weather" city = "Ras al khaymah" apikey = "0fc0e1cb7846095fd088d009900a6eac" url = api_endpoint + "?q" + city + "&appid" + apikey print (url) response = urllib.urlopen(url) print (response) parseResponse = json.loads(response.read()) print (parseResponse)

22nd Mar 2019, 8:25 PM
El-Law lite -
El-Law lite - - avatar
1 Antwort
+ 6
import urllib.request response = urllib.request.urlopen(url)
22nd Mar 2019, 8:41 PM
Anna
Anna - avatar