python练习(-)

 

简单的爬虫示例:

import urllib.request   #python2.x版本为urllib2
url = 'http://www.douban.com/'
webPage=urllib.request.urlopen(url)
data = webPage.read()
data = data.decode('UTF-8')
print(data)
posted @ 2017-08-24 18:37  点滴珍贵,贵在积累  阅读(150)  评论(0编辑  收藏  举报