urllib模块 urllib from urllib import request data = request.urlopen("http://www.baidu.com").read() #获取网页的内容