python read json from url

72

import urllib.request, json 
with urllib.request.urlopen("http://maps.googleapis.com/maps/api/geocode/json?address=google") as url:
    data = json.loads(url.read().decode())
    print(data)
json_url = urlopen(url)

      data = json.loads(json_url.read())

      print data

Comments

Submit
0 Comments