每隔一段时间访问百度

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

#coding: utf-8
import sys
import urllib
import urllib2
from BeautifulSoup import BeautifulSoup
from time import sleep
while(True):
    try:
        res = urllib2.urlopen("http://www.baidu.com/")
        #baidu is encoded by gbk
        print res.read()
        sleep(3600) #per hour
    except(KeyboardInterrupt):
        print("\nbyebyebye.~")
        break
"""