简单的爬虫示例:
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)
2024-02-17 16:05:46
简单的爬虫示例:
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)