The urllib.error module defines the exception classes for exceptions raised by urllib.request. The base exception class is URLError, which inherits from IOError.
The following exceptions are raised by urllib.error as appropriate:
The handlers raise this exception (or derived exceptions) when they run into a problem. It is a subclass of IOError.
Though being an exception (a subclass of URLError), an HTTPError can also function as a non-exceptional file-like return value (the same thing that urlopen() returns). This is useful when handling exotic HTTP errors, such as requests for authentication.
urllib.parse — Parse URLs into components
urllib.robotparser — Parser for robots.txt
Enter search terms or a module, class or function name.