Last active
March 1, 2016 19:35
-
-
Save exit99/bf3a78fc72003d20faac to your computer and use it in GitHub Desktop.
Automating Dave's Job
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 time | |
import urllib2 | |
from datetime import datetime | |
def do_dave(): | |
while 10 < datetime.now().hour < 15: | |
time.sleep(5) | |
urllib2.urlopen('http://www.reddit.com/') | |
if __name__ == '__main__': | |
do_dave() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dave's not here.