python作为一种新锐语言,他的更新是非常的快的。
与相比,它整合了urllib,urllib2,urllib3等一系列的模块,在里,实现一个爬取网页简易的程序如下
# -*- coding: utf-8 -*-
import
url='/'
def getHtml(url):
page=(url)
html=().decode(encoding='utf-8',errors='strict')
return html
print(getHtml(url))
python作为一种新锐语言,他的更新是非常的快的。
与相比,它整合了urllib,urllib2,urllib3等一系列的模块,在里,实现一个爬取网页简易的程序如下
# -*- coding: utf-8 -*-
import
url='/'
def getHtml(url):
page=(url)
html=().decode(encoding='utf-8',errors='strict')
return html
print(getHtml(url))