Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Created July 1, 2013 14:47
Show Gist options
  • Save fmasanori/5901473 to your computer and use it in GitHub Desktop.
Save fmasanori/5901473 to your computer and use it in GitHub Desktop.
ChuckJokes Python2
import urllib
import json
url = 'http://api.icndb.com/jokes/random?limitTo=[nerdy]'
resp = urllib.urlopen(url).read()
data = json.loads(resp)
print (data['value']['joke'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment