Skip to content

Instantly share code, notes, and snippets.

@kstrauss
Last active August 29, 2015 14:20
Show Gist options
  • Save kstrauss/75b4d037979c8eb63167 to your computer and use it in GitHub Desktop.
Save kstrauss/75b4d037979c8eb63167 to your computer and use it in GitHub Desktop.
just need the appropriate rss feed
# found the rss feed for the resolution i liked
$r=Invoke-WebRequest http://channel9.msdn.com/Shows/Windows-Azure-Friday/feed/wmvhigh
$nodes = [xml]$r.Content | % {$_.selectNodes("rss/channel/item/enclosure")}
$nodes.url | % { $dest=split-Path -leaf $_ ; Start-BitsTransfer -Source $_ -Destination $dest -Asynchronous}
Get-BitsTransfer
$destRoot = "c:\temp"
Invoke-RestMethod http://s.ch9.ms/Events/Build/2015/RSS | ? enclosure | % { $_.group.content} |
? type -eq "video/x-ms-wmv" <# there are several formats available here #> |
select url | %{
$dest = join-path $destRoot ( Split-Path -Leaf $_.url)
if (-not (test-path $dest)){
write-host "starting transfer for $dest"get
Start-BitsTransfer -Source $_.url -Destination $dest -Asynchronous
}else{
write-host "Not downloading $dest"
}
}
# show the transfer's started
Get-BitsTransfer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment