Check that a given RSS feed contains at least one <enclosure> tag before allowing it to be added
I used the rss feed shown on the web page https://timharford.com/2006/09/rss-feed-of-undercover-economist/:
https://timharford.com/2006/09/rss-feed-of-undercover-economist/ (At the top of this page is: "This XML file does not appear to have any style information associated with it. The document tree is shown below.")
The subscription was accepted and appears in the list.
Apologies if I'm missing something but the RSS feed linked on that page ( https://www.ft.com/undercover-economist?format=rss ) appears to be linking to written articles instead of being a podcast feed. As podcast feeds are just a kind of RSS feed which reference audio files it isn't completely surprising that Radio Downloader accepts it happily.
Perhaps Radio Downloader should check to see if a feed contains any audio enclosures before it accepts it as a valid podcast, what do you think?
Thank you, Matt, for pointing out that articles are involved. How can I determine that audio files are involved from the source code?
Since Radio Downloader is all about audio, perhaps it should check.
Cheers...Robin
A quick way to check would be to search for <enclosure in the feed XML as a podcast feed would always contain those tags. You can then look to see the contents to make sure they are audio files instead of video (although I'm guessing that video-only feeds aren't that common).
I'll re-purpose this issue to cover adding a check to see if a feed contains enclosure tags before allowing it to be added.
Thank you, Matt. I will follow your advice in future.
Cheers...Robin