爬取百度首页
import urllib.request # 调用urllib库的request模块
respone=urllib.request.urlopen('http://www.baidu.com') # 打开百度页面
html=respone.read().decode('UTF-8') # 获取页面内容
print(html)

爬取百度首页
import urllib.request # 调用urllib库的request模块
respone=urllib.request.urlopen('http://www.baidu.com') # 打开百度页面
html=respone.read().decode('UTF-8') # 获取页面内容
print(html)

1万+
3万+
2260

被折叠的 条评论
为什么被折叠?