Skip to content

Instantly share code, notes, and snippets.

@erichexter
Last active August 29, 2015 13:58
Show Gist options
  • Save erichexter/9974614 to your computer and use it in GitHub Desktop.
Save erichexter/9974614 to your computer and use it in GitHub Desktop.
Download Build 2014 videos - for web developers
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)
#Set the username for windows auth proxy
#$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials
$a = ([xml]$rss.downloadstring("http://s.ch9.ms/Events/Build/2014/rss/mp4high?sort=sequential&direction=desc&term=&tag=asp.net&tag=azure&Media=true"))
$a.rss.channel.item | foreach{
$url = New-Object System.Uri($_.enclosure.url)
$file = $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + ".mp4"
if (!(test-path $file))
{
$wc = (New-Object System.Net.WebClient)
#Set the username for windows auth proxy
#$wc.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials
$wc.DownloadFile($url, $file)
}
}
@erichexter
Copy link
Author

Save this file to the folder you want to download the videos to.

The from a powershell console type .\downloadWebBuildVideos.ps1

The script will download the videos and will not download videos you already have so you can restart it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment