python 之html的headers提取操作

# -*- coding: cp936 -*-
#python 27
#xiaodeng
#python 之html的headers提取操作
#


import urllib,urllib2

html=urllib.urlopen('http://i.cnblogs.com/')
#print html.headers
html=html.headers
print html
print '--'*25
for item,v in html.items():
    print item,':',v

 

posted @ 2015-12-03 14:05  Xiao|Deng  阅读(883)  评论(0编辑  收藏  举报