2009-04-01 URL通信。 python いちおーメモ。 urllib2モジュール使用例 import urllib2 req = urllib2.Request("http://www.yahoo.co.jp/") req.add_header("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6") html = urllib2.urlopen(req).read() print html