pub fn exe() -> Option<PathBuf>Expand description
The best working yt-dlp.exe, or None when none is installed (the URL import is hidden then).
Each candidate is verified with --version, because a PATH entry can hold a broken pip shim (one
left behind by an uninstalled Python exits 1 and prints nothing). Machines with more than one Python
install commonly have several working copies at very different ages — yt-dlp ships near-weekly to
keep up with site changes, so picking merely the first one found can land on a copy too stale to get
past current extractor/bot-check logic (“Sign in to confirm you’re not a bot” and friends). The
version string sorts as “YYYY.MM.DD[.N]”, so the newest wins.