urllib.request.ProxyDigestAuthHandler.http_error_407()

ProxyDigestAuthHandler.http_error_407(req, fp, code, msg, hdrs) Retry the request with authentication information, if available.

urllib.request.ProxyDigestAuthHandler

class urllib.request.ProxyDigestAuthHandler(password_mgr=None) Handle authentication with the proxy. password_mgr, if given, should be something that is compatible with HTTPPasswordMgr; refer to section HTTPPasswordMgr Objects for information on the interface that must be supported.

urllib.request.ProxyBasicAuthHandler.http_error_407()

ProxyBasicAuthHandler.http_error_407(req, fp, code, msg, hdrs) Retry the request with authentication information, if available.

urllib.request.ProxyBasicAuthHandler

class urllib.request.ProxyBasicAuthHandler(password_mgr=None) Handle authentication with the proxy. password_mgr, if given, should be something that is compatible with HTTPPasswordMgr; refer to section HTTPPasswordMgr Objects for information on the interface that must be supported.

urllib.request.pathname2url()

urllib.request.pathname2url(path) Convert the pathname path from the local syntax for a path to the form used in the path component of a URL. This does not produce a complete URL. The return value will already be quoted using the quote() function.

urllib.request.OpenerDirector.open()

OpenerDirector.open(url, data=None[, timeout]) Open the given url (which can be a request object or a string), optionally passing the given data. Arguments, return values and exceptions raised are the same as those of urlopen() (which simply calls the open() method on the currently installed global OpenerDirector). The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be use

urllib.request.OpenerDirector.error()

OpenerDirector.error(proto, *args) Handle an error of the given protocol. This will call the registered error handlers for the given protocol with the given arguments (which are protocol specific). The HTTP protocol is a special case which uses the HTTP response code to determine the specific error handler; refer to the http_error_*() methods of the handler classes. Return values and exceptions raised are the same as those of urlopen().

urllib.request.OpenerDirector.add_handler()

OpenerDirector.add_handler(handler) handler should be an instance of BaseHandler. The following methods are searched, and added to the possible chains (note that HTTP errors are a special case). protocol_open() — signal that the handler knows how to open protocol URLs. http_error_type() — signal that the handler knows how to handle HTTP errors with HTTP error code type. protocol_error() — signal that the handler knows how to handle errors from (non-http) protocol. protocol_request() — si

urllib.request.OpenerDirector

class urllib.request.OpenerDirector The OpenerDirector class opens URLs via BaseHandlers chained together. It manages the chaining of handlers, and recovery from errors.

urllib.request.install_opener()

urllib.request.install_opener(opener) Install an OpenerDirector instance as the default global opener. Installing an opener is only necessary if you want urlopen to use that opener; otherwise, simply call OpenerDirector.open() instead of urlopen(). The code does not check for a real OpenerDirector, and any class with the appropriate interface will work.