Created
November 18, 2014 06:05
-
-
Save sunzhongwei/cbf55d4c08639794494c to your computer and use it in GitHub Desktop.
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 | |
# -*- coding: utf-8 -*- | |
import time | |
import urllib2 | |
from datetime import datetime | |
def work(): | |
while 10 < datetime.now().hour < 15: | |
time.sleep(5) | |
urllib2.urlopen("http://weibo.com") | |
if '__main__' == __name__: | |
work() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment