urllib使用二
urlopen方法返回一個html
對html使用info()方法返回HTTPMessage對象實例
import urllibdef 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)?
轉載于:https://www.cnblogs.com/chillytao-suiyuan/p/9147655.html
總結
- 上一篇: 5- vue django restfu
- 下一篇: python3 开发面试题(collec