urlopen方法返回一个html

对html使用info()方法返回HTTPMessage对象实例

import urllib

def print_list(lists):
for i in lists:
print(i)
html = urllib.urlopen("http://www.runoob.com/python/python-email.html")
#info()方法返回HTTPMessage实例
msg = html.info()
#HTTPMessage实例的方法:
#headers
#gettype()
#getheader()/getheaders()
#items()/keys()/values()
print_list(msg.headers)

最新文章

  1. ViewController respondsToSelector 错误的解决方法
  2. HBase 实战(2)--时间序列检索和面检索的应用场景实战
  3. php大力力 [048节] php一点支付开发资料,很散
  4. WaxPatch中demo注意问题
  5. core animation (转)
  6. MVC学习中遇到问题
  7. Maven构建项目速度慢问题解决
  8. using inno setup uninstall default icon
  9. Android应用源码安卓短信拦截木马项目源码
  10. vijos 1085 Sunnypig闯三角关
  11. UVA 11729 - Commando War(贪心 相邻交换法)
  12. VS2015预览版中的C#6.0 新功能(一)
  13. 实测Eclipse连接小米2S调试问题
  14. HoloLens开发手记 - 构建2D应用 Building 2D apps
  15. js表白心形特效
  16. 压缩感知“Hello World”代码初步学习
  17. spring整合redis使用RedisTemplate的坑Could not get a resource from the pool
  18. react-router路由地址变了页面却没有跳转的解决办法
  19. SQL0803问题 键值重复
  20. nrf52832-定时器例程

热门文章

  1. [SVN]TortoiseSVN工具培训1─为什么要用SVN?
  2. 聪明的Azure CDN,帮你找到云端捷径
  3. AOP术语分析
  4. iBrand 教程:Git 软件安装过程截图
  5. Leetcode 46 47 Permutation, 77 combination
  6. 增量数据同步中间件DataLink分享(已开源)
  7. 幻灯片的JQuqey的制作效果,只要几行代码
  8. ABI and ISA
  9. 二叉树遍历,先序序列+中序序列=后序序列,Poj(2255)
  10. Task 的入门