Last active
August 29, 2015 13:58
-
-
Save erichexter/9974614 to your computer and use it in GitHub Desktop.
Download Build 2014 videos - for web developers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.