Created
May 8, 2017 15:13
-
-
Save chrisma/54da62c66a600ca379f9c6daa03e10b6 to your computer and use it in GitHub Desktop.
Use an API in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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