2010-02-15 37 views

回答

3

urllib2.urlopen()返回addinfourlheaders

>>> import urllib2 
>>> f = urllib2.urlopen('http://www.python.org/') 
>>> f.headers['content-type'] 
'text/html' 
>>>