[Haskell-cafe] Parsing Atom feed link

Francesco Ariis fa-ml at ariis.it
Sat Sep 26 08:15:24 UTC 2015


On Sat, Sep 26, 2015 at 10:59:12AM +0300, fr33domlover wrote:
> Hello,
> 
> I'm using the package 'feed' to parse news feeds and I noticed it fails to
> parse the item links of many feeds! I investigated and apparently here is why.
> Many Atom feeds in practice seem to publish their item links like this:
> 
> <link href="http://....."/>

Checking the code [1] it looks like it is indeed the case

    linkRel = Right `fmap` pAttr "rel" e

[1] http://hackage.haskell.org/package/feed-0.3.10.1/docs/src/Text-Atom-Feed-Import.html#pLink

> I looked at the examples at https://tools.ietf.org/html/rfc4287 and I just
> checked Octopress (Ruby) and Ikiwiki (Perl) generated feeds. The RFC's examples
> have item links without "alernate" (as the only item link provided) and both
> generators I mentioned create feed item links without "alternate".
> 
> 
> Should 'feed' be fixed to recognize them?

Since you have done the homework and this is rfc compliant, have you
tried sending an email to the maintainer [1]?
It seems an uncontroversial change and they are active (last version
released in 2015), I bet they are be willing to fix this.

[1] http://hackage.haskell.org/package/feed



More information about the Haskell-Cafe mailing list