Last active
August 29, 2015 13:57
-
-
Save devlead/9811507 to your computer and use it in GitHub Desktop.
Get all high quiality azure friday episodes for Build trip
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
$(Invoke-RestMethod -Uri http://channel9.msdn.com/Shows/Windows-Azure-Friday/feed/mp4high)|%{$pattern = "[{0}]" -f ([Regex]::Escape( [System.IO.Path]::GetInvalidFileNameChars() -join '' )); @{ FileName = [RegEx]::Replace($_.title + ".mp4", $pattern, ''); Url=@($_.group.content.url |sls high.mp4)[0].ToString()} }|%{if(!(Test-Path -Path $_.FileName )){Invoke-WebRequest -Uri $_.Url -OutFile $_.FileName}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added check for if file name exists and clean file name of invalid characters.