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