Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62048 > unrolled thread

Question RE urllib

Started byJeff James <jeff@jeffljames.com>
First post2013-12-16 04:40 -0700
Last post2013-12-16 04:40 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Question RE urllib Jeff James <jeff@jeffljames.com> - 2013-12-16 04:40 -0700

#62048 — Question RE urllib

FromJeff James <jeff@jeffljames.com>
Date2013-12-16 04:40 -0700
SubjectQuestion RE urllib
Message-ID<mailman.4205.1387194518.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

So I'm using the following script to check our sites to make sure they are
all up and some of them are reporting they are "down" when, in fact, they
are actually up.   These sites do not require a logon in order for the home
page to come up.  Could this be due to some port being blocked internally ?
 Only one of the sites reporting as down is "https" but all are internal
sites.  Is there some other component I should be including in the script ?
 There are about 30 or 40 sites that I have listed in all.  I just use
those in the following script as examples.   Thanks

import urllib

sites = ["http://www.amazon.com/", "https://internalsite.com/intranet.html",
etc.]

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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web