标签:from url www get utf-8 odi imp int %s
# -*- coding:utf-8 -*- # Author:Brownyangyang from urllib import request def f(url): print(‘GET:%s‘ % url) resp = request.urlopen(url) data = resp.read() print("%d bytes received from %s"% (len(data),url)) f = open("url.html","wb") f.write(data) f.close() print(‘%d bytes received from %s.‘ %(len(data),url)) f("http://www.cnblogs.com/brownyangyang/p/8926478.html")
标签:from url www get utf-8 odi imp int %s
原文地址:https://www.cnblogs.com/brownyangyang/p/8934762.html