#!/usr/bin/env python
# -*- coding: cp936 -*-
import time, easygui, re, urllib
def getHtml(url):
page = urllib.urlopen(url)
html = page.read()
return html
def getContent(html):
reg =r'setLmCode'
contentreg = re.compile(reg)
content = re.findall(contentreg, html)
return content
def whileContent():
while 1:
html = getHtml("")
content = getContent(html)
time.sleep(1)
return content
def tiXing(content):
while 1:
if len(content) >= 20:
#print len(content)
easygui.msgbox("Remind, Data update it !", title="Remind, Data update it !", ok_button="I know")
time.sleep(1)
break
else:
continue
content = whileContent()
tiXing(content)
阅读(1772) | 评论(0) | 转发(0) |