nltk.HTTPPasswordMgrWithDefaultRealm.reduce_uri

HTTPPasswordMgrWithDefaultRealm.reduce_uri(uri, default_port=True)

Accept authority or URI and extract only the authority and path.