Skip to content

Instantly share code, notes, and snippets.

@atao
Last active July 17, 2017 15:14
Show Gist options
  • Save atao/be8745a84777ff9ea5e67b1a06ba518d to your computer and use it in GitHub Desktop.
Save atao/be8745a84777ff9ea5e67b1a06ba518d to your computer and use it in GitHub Desktop.
Vidéo Download from website using YouTube-dl
# Vidéo Download from website using YouTube-dl
# Version 17/07/2017
$data = Invoke-WebRequest "https://www.tf1.fr/tf1/c-est-canteloup"
# Get links
$data = $data.links | select href
# Remove Warning for exe
$env:SEE_MASK_NOZONECHECKS = 1
foreach ($line in $data){
if ($line.href -like "https://www.tf1.fr/tf1/c-est-canteloup/videos/*")
{
Start-Process -NoNewWindow .\youtube-dl.exe $line.href
}else{
"KO $line"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment