kurtmckee/feedparser

Tolerant mode for feeds with no link elements

Closed this issue · 1 comments

The Amazon Science feed has sometimes entries with no link element:
https://www.amazon.science/index.rss

<item>
      <title>Amazon panel discusses fairness in AI</title>
      <description>Watch the recorded panel discussion that aired the week of NeurIPS 2020.</description>
      <pubDate>Wed, 25 Nov 2020 18:07:19 GMT</pubDate>
</item>

which triggers, logically, an exception in feedparser:
AttributeError: object has no attribute 'link'

A tolerant mode for feedparser would greatly help, skipping these bad entries entirely, or tolerating entries with no link, depending on what disrupts the less the feedparser code (the only functional need is to be able to return the other valid entries).

Wrong ticket. The issue was coming from my own downstream code. Sorry for the noise.