<div dir="ltr">Sorry to be a pain here, guys, as I'm also a newbie at this as well.  <div><br></div><div>Where, exactly in the script would I place the " <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">print str(e)  " ?</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Thanks</span></div><div><font face="arial, sans-serif"><br>
</font></div><div><font face="arial, sans-serif">Original message :<br></font><br style="font-family:arial,sans-serif;font-size:12.800000190734863px"><blockquote class="gmail_quote" style="font-family:arial,sans-serif;font-size:12.800000190734863px;margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">I'm not really receiving an "exception" other than those three sites, out of the 30 or so I have listed, are the only sites which show "is down" at the end of that line specifying the site.</div>
<div dir="ltr"><br><div>Where " # " has been substituted for our domain name........<br><div><br></div><div><a href="https://my./#%23%23%23.com/intranet.html" target="_blank">https://my.####.com/intranet.html</a><b> is down</b></div>
<div>http://#####.main.####.com/psso/pssignsso.asp?dbname=FSPRD90<b> is down<br></b></div><div><a href="http://sharepoint./#%23%23%23.com/regions/west/PHX_NSC/default.aspx" target="_blank">http://sharepoint.####.com/regions/west/PHX_NSC/default.aspx</a><b> is down<br>
</b></div><div><b><br></b></div><div><b><br></b><div><br></div><div>> So I'm using the following script to check our sites to make sure they are<br>> all up and some of them are reporting they are "down" when, in fact, they<br>
> are actually up.   These sites do not require a logon in order for the home<br>> page to come up.  Could this be due to some port being blocked internally ?<br>> Only one of the sites reporting as down is "https" but all are internal<br>
> sites.  Is there some other component I should be including in the script ?<br>> There are about 30 or 40 sites that I have listed in all.  I just use those<br>> in the following script as examples.   Thanks<br>
><br>> import urllib<br>><br>> sites = ["<a href="http://www.amazon.com/" target="_blank">http://www.amazon.com/</a>", "<a href="https://internalsite.com/intranet.html" target="_blank">https://internalsite.com/intranet.html</a>",<br>
> etc.]<br>><br>> for site in sites:<br>>     try:<br>>         urllib.urlopen(site)<br>>         print site + " "<br>>     except Exception, e:<br>>         print site + " is down"<br>
<br>In the handler print out the exception you are getting.<br></div></div></div></div></blockquote><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
If your exception handler is being called then you are indeed getting an exception. Add:</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
print str(e) </div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">to the handler </div>
</div></div>