python之urllib模块 作者:马育民 • 2019-01-12 16:41 • 阅读:10080 # urllib模块 内置的urllib模块是高级的http协议客户端,用于处理URL 主要有以下子模块: 1. [urllib.request](http://www.malaoshi.top/show_1EF2bq7Z3osN.html "urllib.request") 打开url并读取数据 2. urllib.error 包含一些异常 3. urllib.parse 解析url 4. urllib.robotparser 解析 robots.txt 文件(爬虫协议) 官方网址:https://docs.python.org/3/library/urllib.html#module-urllib 原文出处:http://www.malaoshi.top/show_1EF2bA5xFoh0.html