Created
May 9, 2014 00:36
-
-
Save jeremyjbowers/8283d1bb200b46f0a365 to your computer and use it in GitHub Desktop.
This will run every 5 seconds and update NFL draft information. Requires requests.
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
#!/usr/bin/env python | |
import datetime | |
import threading | |
import time | |
import requests | |
def request_draft_info(): | |
threading.Timer(5, request_draft_info).start(); | |
now = datetime.datetime.now() | |
timestamp = time.mktime(now.timetuple()) | |
r = requests.get('http://www.nfl.com/liveupdate/draft/2014/draftroundss.xml?=%s' % timestamp) | |
print r.content | |
if __name__ == '__main__': | |
request_draft_info() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment