Created
December 19, 2013 19:12
-
-
Save icheko/8044523 to your computer and use it in GitHub Desktop.
Quick and dirty Chuck Norris python script. Used in our SVN post commit hook. In case you don't have the requests library: yum install python-requests.noarch
This file contains 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
import json, requests | |
url = 'http://api.icndb.com/jokes/random' | |
params = dict( | |
category='nerdy' | |
) | |
resp = requests.get(url=url, params=params) | |
data = json.loads(resp.content) | |
print data['value']['joke'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment