(base, *urls)
return btpl._replace(path=path).geturl()
this is like urllib.parse.urljoin, except it works around the scheme-specific
    cleverness in the aforementioned code, ignores anything in the url except the path,
    and accepts more than one url.
this is like urllib.parse.urljoin, except it works around the scheme-specific
    cleverness in the aforementioned code, ignores anything in the url except the path,
    and accepts more than one url.
this is like urllib . parse . urljoin except it works around the scheme - specific cleverness in the aforementioned code ignores anything in the url except the path and accepts more than one url .
def path_join(base, *urls):
    """
    this is like urllib.parse.urljoin, except it works around the scheme-specific
    cleverness in the aforementioned code, ignores anything in the url except the path,
    and accepts more than one url.
    """
    if not base.endswith("/"):
        base += "/"
    btpl = urlsplit(base)
    path = btpl.path
    for url in urls:
        utpl = urlsplit(url)
        if btpl.scheme == "":
            path = os.path.join(path, utpl.path)
            path = os.path.normpath(path)
        else:
            path = urljoin(path, utpl.path)
    return btpl._replace(path=path).geturl()
def path_join ( base , * urls ) : if not base . endswith ( "/" ) : base += "/" btpl = urlsplit ( base ) path = btpl . path for url in urls : utpl = urlsplit ( url ) if btpl . scheme == "" : path = os . path . join ( path , utpl . path ) path = os . path . normpath ( path ) else : path = urljoin ( path , utpl . path ) return btpl . _replace ( path = path ) . geturl ( )