Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61559 > unrolled thread
| Started by | Larry Martell <larry.martell@gmail.com> |
|---|---|
| First post | 2013-12-11 07:16 -0500 |
| Last post | 2013-12-11 07:16 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Script Request Larry Martell <larry.martell@gmail.com> - 2013-12-11 07:16 -0500
| From | Larry Martell <larry.martell@gmail.com> |
|---|---|
| Date | 2013-12-11 07:16 -0500 |
| Subject | Re: Script Request |
| Message-ID | <mailman.3892.1386764201.18130.python-list@python.org> |
On Wed, Dec 11, 2013 at 6:53 AM, Jeff James <jeff@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"
Back to top | Article view | comp.lang.python
csiph-web