Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podcast XML formating #1

Open
ManFromDelMunky opened this issue Jun 19, 2019 · 0 comments
Open

Podcast XML formating #1

ManFromDelMunky opened this issue Jun 19, 2019 · 0 comments

Comments

@ManFromDelMunky
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant