Skip to content

Instantly share code, notes, and snippets.

@chrisma
Created May 8, 2017 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisma/54da62c66a600ca379f9c6daa03e10b6 to your computer and use it in GitHub Desktop.
Save chrisma/54da62c66a600ca379f9c6daa03e10b6 to your computer and use it in GitHub Desktop.
Use an API in Python
from requests import get
# Some more ideas: https://www.programmableweb.com/category/humor/api
data = get('https://api.chucknorris.io/jokes/random').json()
joke = data['value']
print joke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment