(url)
return auth
Given a url with authentication components, extract them into a tuple of
    username,password.
Given a url with authentication components, extract them into a tuple of
    username,password.
Given a url with authentication components extract them into a tuple of username password .
def get_auth_from_url(url):
    """Given a url with authentication components, extract them into a tuple of
    username,password."""
    parsed = urlparse(url)

    try:
        auth = (unquote(parsed.username), unquote(parsed.password))
    except (AttributeError, TypeError):
        auth = ('', '')

    return auth
def get_auth_from_url ( url ) : parsed = urlparse ( url ) try : auth = ( unquote ( parsed . username ) , unquote ( parsed . password ) ) except ( AttributeError , TypeError ) : auth = ( '' , '' ) return auth