# Import libraries
import urllib.request, json
# Get json from url
with urllib.request.urlopen("http://maps.googleapis.com/maps/api/geocode/json?address=Oslo") as url:
# Load JSON
data = json.loads(url.read().decode())
# Print data
print(data)
How to load JSON from url using Python?
/ #Python
If you want to get JSON from a website you need to import a few libraries and run a request. Here's how you do it.
Comments
No comments yet...