ID EN
Urllib Request

build_opener

Python 3.11

Return an OpenerDirector instance, which chains the handlers in the order given. handlers can be either instances of BaseHandler, or subclasses of BaseHandler (in which case it must be possible to call the constructor without any parameters). Instances of the following classes will be in front of the handlers, unless the handlers contain them, instances of them or subclasses of them: ProxyHandler (if proxy settings are detected), UnknownHandler, HTTPHandler, HTTPDefaultErrorHandler, HTTPRedirectHandler, FTPHandler, FileHandler, HTTPErrorProcessor.

Syntax

PYTHON
urllib.request.build_opener([handler, ...])

See Also

OpenerDirector BaseHandler BaseHandler ProxyHandler UnknownHandler HTTPHandler HTTPDefaultErrorHandler HTTPRedirectHandler