Skip to content

Podcast XML formating #1

@ManFromDelMunky

Description

@ManFromDelMunky

In reference to your Podcast PowerShell Module.
First of all this is an excellent module it was exactly what I was looking for.
I did however find one annoying podcast that appears to have an XML BOM at the start of "???" It appears that this then wont load in as XML as the parser throws an error.
http://www.john00fleming.co.uk/mixes/podcasts/Nov08/podcast.xml
I fixed it by using quick check
Try {
[String]$PodcastString = Invoke-WebRequest -Uri $PodcastURL
If($PodcastString -like '???*') {
$Trim = [String]$PodcastString.TrimStart("???")
[xml]$PodcastFeed = $Trim
}
Else {
[xml]$PodcastFeed = Invoke-WebRequest -Uri $PodcastURL
}

There are probably better ways of doing it but hey thought you might want to know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions