Skip to content

Instantly share code, notes, and snippets.

@jeremyjbowers
Created May 9, 2014 00:36
Show Gist options
  • Save jeremyjbowers/8283d1bb200b46f0a365 to your computer and use it in GitHub Desktop.
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.
#!/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