TechEd North America Slides Download Script

So the download script only gets the videos. A quick adjustment and I was able to get the slide decks as well!!!

Here’s the code:

 

[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)

$a = [xml]($rss.downloadstring(“http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/RSS/slides”))

$a.rss.channel.item | foreach{
$code = $_.comments.split(“/”) | select -last 1

$url = New-Object System.Uri($_.enclosure.url)

$file = $code + “-” + $_.creator + “-” + $_.title.Replace(“:”, “-“).Replace(“?”, “”).Replace(“/”, “-“).Replace(“<“, “”).Replace(“|”, “”).Replace(“‘”, “”).Replace(“`””, “”).Replace(“*”, “”) + “.pptx”
$file = $file.Replace(“â”, “”);
$file = $file.Replace(“¬”, “”);
$file = $file.Replace(“€”, “”);
$file = $file.Replace(“œ”, “”);
$file = $file.Replace(“‘”, “”);

if (!(test-path $file))
{
$file
$wc = (New-Object System.Net.WebClient)
$wc.DownloadFile($url, $file)
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: