Closed Daltz333 closed 3 years ago
from urllib.parse import urlparse, urlunparse from pathlib import PosixPath parse_result = urlparse("https://docs.wpilib.org/en/stable/") print( urlunparse(( parse_result.scheme, parse_result.netloc, PosixPath(parse_result.path).parent.parent.as_posix(), "", "", "", )) )
gets the RTD url with the language and version stripped.
Also, there should be a check for RTD.
gets the RTD url with the language and version stripped.