Python module providing a high-level interface for fetching data across the World Wide Web. Predecessor to urllib2. In Python 3, urllib2 and urllib have been reorganized and merged into urllib.
For Python 2, the urllib module is the predecessor of the urllib2 module, while the latter still uses some functionality of the former.
For Python 3, the urllib package was reorganized. It now has no content of its own. All methods and classes are in several submodules:
urllib.requestfor opening and reading URLsurllib.errorcontaining the exceptions raised byurllib.requesturllib.parsefor parsing URLsurllib.robotparserfor parsingrobots.txtfiles
Note that urllib2 doesn't exist in Python 3 anymore.