Skip to content

Instantly share code, notes, and snippets.

@jungaretti
Last active March 28, 2022 16:25
Show Gist options
  • Save jungaretti/eff0ebdb889b06da5a41f0d40c80e62c to your computer and use it in GitHub Desktop.
Save jungaretti/eff0ebdb889b06da5a41f0d40c80e62c to your computer and use it in GitHub Desktop.
Download an entire YouTube channel using youtube-dl with parallel downloads
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]
$ChannelURL
)
# TODO: Use any youtube-dl
..\youtube-dl.exe --get-id $Channel | % {
Start-Job -ScriptBlock { ..\youtube-dl.exe --restrict-filenames "https://youtube.com/watch?v=$($args[0])" } -ArgumentList @($_) -Name $_
}
# List jobs with Get-Job
# View output with Receive-Job $id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment