Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Download TechEd North America videos with video code prepended to file name
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)
#Set the username for windows auth proxy
$a = ([xml]$rss.downloadstring(""))
$ | foreach{
$code = $_.comments.split("/") | select -last 1
$url = New-Object System.Uri($_.enclosure.url)
$file = $code + "-" + $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "") + ".mp4"
if (!(test-path $file))
$wc = (New-Object System.Net.WebClient)
#Set the username for windows auth proxy
$wc.DownloadFile($url, $file)

This comment has been minimized.

Copy link

ciphertxt commented Mar 20, 2014

Forked and added some logic to retry the downloads if the transfer got cut off for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.