import urllib as u import re as r import time as t def check(school, site, count): f = u.urlopen(site) h = f.read() sr = r.search(school, h) if sr: print "School's out!" else: count = count + 1 print school, "still has school tomorrow :: check", count t.sleep(300) check(school, site, count)