简单的爬虫示例:
import urllib.request #python2.x版本为urllib2url = 'http://www.douban.com/'webPage=urllib.request.urlopen(url)data = webPage.read()data = data.decode('UTF-8')print(data)