# conding=utf-8 import urllib.request url = "http://www.baidu.com" request = urllib.request.Request(url) response = urllib.request.urlopen(request) data = response.read() data = data.decode("UTF-8") print(response.info())