用Python抓取指定页面

#encoding:UTF-8
import urllib.request
 
url = "http://www.baidu.com"
data = urllib.request.urlopen(url).read()
data = data.decode('UTF-8')
print(data)

 

posted @ 2016-05-06 13:38  疯陈演义  阅读(237)  评论(0编辑  收藏  举报