Python check status of URL stream
<p>I'm trying to use python to check if a MJPEG stream url is alive or not.</p>

<p>I've tried the following:</p>

<pre><code> connection = urlopen('http://localhost/videostream.cgi'), timeout=10)
 response = connection.getcode()
 connection.close()
</code></pre>

<p>With no luck, it just times out of gives an error.</p>

<p>If I view the status in a firebug or chrome dev toolbar, the status is always "Pending" instead of "200".</p>

<p>Is there a way to check to make sure it's not a 404 or other error?</p>

<p>Cheers,
Ben</p>
