爬虫

# 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())

  

posted @ 2017-08-09 16:01  brady-wang  阅读(188)  评论(0编辑  收藏  举报