python爬虫笔记
爬虫 http://httpbin.org/ 验证请求 1.urllib库(python3) python内置的HTTP请求库 urllib.request 请求模块 ( https://yiyibooks.cn/xx/python_352/library/urllib.request.html#module-urllib.request ) urllib.error 异常处理模块( https://yiyibooks.cn/xx/python_352/library/urllib.error.html#module-urllib.error ) urllib.parse url解析模块( https://yiyibooks.cn/xx/python_352/library/urllib.parse.html#module-urllib.parse ) urllib.robotparser robots.txt解析模块( https://yiyibooks.cn/xx/python_352/library/urllib.robotparser.html#module-urllib.robotparser ) 请求: import urllib.request urllib.request.urlopen(url, data=None, [timeout, ]*, cafile