I am trying to GET a URL using Python and the response is JSON. However, when I run
import urllib2 response = urllib2.urlopen(\'https://api.instagram.com/v1/
import json import urllib url = 'http://example.com/file.json' r = urllib.request.urlopen(url) data = json.loads(r.read().decode(r.info().get_param('charset') or 'utf-8')) print(data)
urllib, for Python 3.4 HTTPMessage, returned by r.info()