Python爬虫(1),Python3.x

直接上代码:

import urllib.request;//引入包

response = urllib.request.urlopen("http://www.baidu.com");//加载网页
html=response.read();//读取
print('loading...baidu');
print(html);//打印网页源码

posted on 2016-09-02 22:52  愤怒的苹果ext  阅读(17)  评论(0编辑  收藏  举报

导航