Python爬虫第一幕
什么是UrllibPython内置的HTTP请求库urllib.request 请求模块urllib.error 异常处理模块urllib.parse url解析模块url.robotparser robots.txt解析模块urllib相比于Python2的变化Python2import urllib2
response = urllib.urlopen('http://www.baidu.com')Python3import urllib.request
response = urllib.request.urlopen('http://www.baidu.com')