User-Agentãæå®ãã¦ãªã¯ã¨ã¹ã
>>>import urllib2 >>>req = urllib2.Request("http://www.google.co.jp") >>>req.add_header("User-agent", "python") >>>urlhandler = urllib2.urlopen(req)
>>>import urllib2 >>>req = urllib2.Request("http://www.google.co.jp") >>>req.add_header("User-agent", "python") >>>urlhandler = urllib2.urlopen(req)