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)
1 Respuesta
+ 6
import urllib.request
response = urllib.request.urlopen(url)