title: Skip URL if timeout
body: <p>I have a list of URL's</p>
  
  <p>I am using the following to retrieve their contents:</p>
  
  <pre><code>for url in url_list:
      req = urllib2.Request(url)
      resp = urllib2.urlopen(req, timeout=5)
      resp_page = resp.read()
      print resp_page
  </code></pre>
  
  <p>When there is a timeout, the program just crashes. I just want to read the next URL if there is a <code>socket.timeout: timed out</code>. How to do this?</p>
  
  <p>Thanks</p>