Skip to content

Instantly share code, notes, and snippets.

@hminaya
Last active December 16, 2015 05:18
Show Gist options
  • Save hminaya/5383018 to your computer and use it in GitHub Desktop.
Save hminaya/5383018 to your computer and use it in GitHub Desktop.
get JSON api with python
import urllib2
import simplejson
url = "http://www.emplea.do/jobs.json"
resp = urllib2.Request(url)
opener = urllib2.build_opener()
data = opener.open(resp)
result = simplejson.load(data)
print result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment