#网页下载
import urllib
urllib.urlretrieve("https://www.baidu.com","d:\\ttt.html")
#获取html页面
response=urllib2.urlopen(‘www.baidu.com‘,"d:\\ttt.html")
html=response.read()
print html
标签:imp port https post 下载 ret www bsp open
#网页下载
import urllib
urllib.urlretrieve("https://www.baidu.com","d:\\ttt.html")
#获取html页面
response=urllib2.urlopen(‘www.baidu.com‘,"d:\\ttt.html")
html=response.read()
print html
标签:imp port https post 下载 ret www bsp open
原文地址:https://www.cnblogs.com/xueli/p/8444008.html