Open joeyh opened 11 years ago
The feed validator does try to tell you that the feed is invalid -- RSS2
http://cyber.law.harvard.edu/rss/rss.html#requiredChannelElements
but this feed doesn't have any. Hence it fails to parse by the RSS2 parser/importer.
This library tries to make a best effort in case of feed parse errors, but the code paths that work with this untyped representation is less exercised. And it is preferable if we can avoid an untyped/unparseable representation to start with.
Push a pair of fixes; allowing such description-less RSS2 feeds to parse + fixed a bug in the untyped case for getItemEnclosure.
Does "push a pair of fixes" mean this got fixed? Bug is still listed as open.
Tested with 0.3.9.1:
Prelude Text.Feed.Query Text.Feed.Import Control.Applicative> map getItemEnclosure . getFeedItems <$> parseFeedFromFile "podcast.xml" [Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0),Just ("",Nothing,0)]
The enclosures in the have non-null urls when you look at it. The W3C feed validator says it fails to validate due to a number of silly issues, but does not come up with any problems with its enclosures.