urllib
— URL handling modulesURL处理模块¶
Source code: Lib/urllib/
urllib
is a package that collects several modules for working with URLs:是一个包,它收集了几个用于处理URL的模块:
urllib.request
for opening and reading URLs用于打开和读取URLurllib.error
containing the exceptions raised by包含urllib.request
urllib.request
引发的异常urllib.parse
for parsing URLs用于解析URLurllib.robotparser
for parsing用于解析robots.txt
filesrobots.txt
文件