python 抓取网页
2015-05-17 python 928
import urllib.request
res = urllib.request.urlopen(\"http://www.yetyun.com\")
content = res.read().decode(\"utf-8\")
t = open(\"test.html\",\"w\",encoding=\'utf-8\')
print(content,file=t)
t.close()
import urllib.request res = urllib.request.urlopen("http://www.yetyun.com") content = res.read().decode("utf-8") t = open("test.html","w",encoding='utf-8') print(content,file=t) t.close()
很赞哦! (0)
相关文章
文章评论
-
-
-
0条评论