sof / feed

Haskell package for handling various feed (RSS) formats.
Other
14 stars 30 forks source link

wrongly returns empty enclosure urls for http://www.tatw.co.uk/podcast.xml #7

Open joeyh opened 11 years ago

joeyh commented 11 years ago

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.

sof commented 11 years ago

The feed validator does try to tell you that the feed is invalid -- RSS2 s must have a description,

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.

joeyh commented 9 years ago

Does "push a pair of fixes" mean this got fixed? Bug is still listed as open.