import urllib
p=urllib.urlopen('http://www.baidu.com')
html=p.read()
str1= "百度" #关键字搜索
if str1 in html:
print "ok"
send_mail()
else :
print "Nok"
p=urllib.urlopen('http://www.baidu.com')
html=p.read()
str1= "百度" #关键字搜索
if str1 in html:
print "ok"
send_mail()
else :
print "Nok"