However, we believe that it can be useful to know how to open URLs and interact with them without using a 3rd party and it may also help you appreciate why the requests package is so popular. The official documentation actually recommends that you might want to check out the 3rd party library, requests, for a higher-level HTTP client interface. We will be covering each part individually except for urllib.error. The current version of urllib is made up of the following modules: These are now a part of the urllib package in Python 3. If you are coming from a Python 2 background you will note that in Python 2 you had urllib and urllib2.
The urllib module in Python 3 is a collection of modules that you can use for working with URLs. In other words, you won’t find urllib2 in Python 3 instead of urllib.
The urllib module is the replacement of urllib2 as long as migrating from Python 2 to Python 3. Using the urllib.request package in Python 3.