File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,15 @@ Param (
88 $DownloadFolder = ' .\'
99)
1010
11+ # Open the specified download folder
1112Push-Location $DownloadFolder
1213
14+ # Initialize the downloader
1315$WebClient = New-Object System.Net.WebClient
1416
17+ # Download the RSS
18+ # If the download failed, throw the error into the user's face and stop the script.
19+ # That's not an awfully polite thing to say, but that's what "throw" implies.
1520Write-Output ' Downloading RSS feed...'
1621try {
1722 $RSSWebObject = ([xml ]($WebClient ).downloadstring($RssUrl ))
@@ -25,6 +30,7 @@ $counter=0;
2530foreach ($item in $RSSWebObject.rss.channel.item ) {
2631 $counter ++
2732
33+ # Channel 9 isn't perfect. Some RSS feeds are missing an enclosure or a URL.
2834 if ($null -eq $item.enclosure.url ) {
2935 Write-Output $ (' {0:D2}: No URL found)' -f $counter )
3036 continue
You can’t perform that action at this time.
0 commit comments