<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tk0miya</author_name>
  <author_url>https://blog.hatena.ne.jp/tk0miya/</author_url>
  <blog_title>Hack like a rolling stone</blog_title>
  <blog_url>https://tk0miya.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>6/26 追記: Python2.7.3 について追試urllib2 を使って Web API を呼び出す場合、タイムアウトが気になりますよね。 urllib2 では urllib.urlopen() の引数に timeout を指定することができます。 import urllib2 urllib2.urlopen('http://www.yahoo.co.jp/', timeout=1) それでは、タイムアウトが発生したことはどのように得られるのでしょうか。 実験してみたところ例外 urllib2.URLError が発生していたので、 import urllib2 import timeo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftk0miya.hatenablog.com%2Fentry%2F20120623%2Fp1&quot; title=&quot;続・urllib2 で timeout を捕まえる - Hack like a rolling stone&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-06-23 00:00:02</published>
  <title>続・urllib2 で timeout を捕まえる</title>
  <type>rich</type>
  <url>https://tk0miya.hatenablog.com/entry/20120623/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
