Script Request

Larry Martell larry.martell at gmail.com
Wed Dec 11 13:16:40 CET 2013


On Wed, Dec 11, 2013 at 6:53 AM, Jeff James <jeff at jeffljames.com> wrote:
> Looking for a script which will check connectivity of any or all of our
> company URL's first thing in the morning to make sure none or our sites are
> down.     Any suggestions ?   Thank You

import urllib

sites = ["http://www.amazon.com/", "http://nowhere.com"]

for site in sites:
    try:
        urllib.urlopen(site)
        print site + " is up"
    except Exception, e:
        print site + " is down"



More information about the Python-list mailing list