python2和python3存在着一些不同点:
(1)print的使用不同,python3需要打(),而python2不需要.
(2)urllib的调用,python3需要使用urllib.request.,而python2直接使用urllib.,且import.urllib.request。
(3)page = urllib.request.urlopen(url)
html = page.read(),html是字符型数据,re.findall(,html.decode('utf-8')),findall是接受字节数据。