Previous topic

libearth.parser.autodiscovery — Autodiscovery

Next topic

libearth.repository — Repositories

This Page

libearth.parser.rss2 — RSS 2.0 parser

Parsing RSS 2.0 feed.

libearth.parser.rss2.parse_rss(xml, feed_url=None, parse_entry=True)

Parse RSS 2.0 XML and translate it into Atom.

To make the feed data valid in Atom format, id and link[rel=self] fields would become the url of the feed.

If pubDate is not present, updated field will be from the latest entry’s updated time, or the time it’s crawled instead.

  • xml (str) – rss 2.0 xml string to parse
  • parse_item (bool) – whether to parse items (entries) as well. it’s useful when to ignore items when retrieve <source>. True by default

a pair of (Feed, crawler hint)

Return type:


Fork me on GitHub