道可叨 | Python 标准库 urllib2 的使用细节
request = urllib2.Request(uri) request.add_header('User-Agent', 'fake-client') response = urllib2.urlopen(request)