PowerShell/dl.ps1
2023-06-18 23:02:58 -06:00

19 lines
416 B
PowerShell

param(
$url = "",
$out = "~/Videos/Downloads/",
$namepattern = "%(title)s.%(ext)s"
)
$ytdlp_options = "--live-from-start --wait-for-video 3600 --sponsorblock-remove all --output $out$namepattern $url"
if ($url) {
Start-Process yt-dlp -ArgumentList $ytdlp_options
}
else {
while ($true) {
$url = Read-host URL
if (!$url) { break }
Start-Process yt-dlp -ArgumentList $ytdlp_options
}
}