libearth.parser.rss_base — Commonly used objects in RSS1 and RSS2

RSS1 and RSS2 are naive compared to Atom feed. So there are several things such as namespace or parsing logic that can be used to parse both feeds. This module contains those common things.

libearth.parser.rss_base.CONTENT_XMLNS = 'http://purl.org/rss/1.0/modules/content/'

(str) The XML namespace for the predefined content: prefix.

class libearth.parser.rss_base.RSSSession(feed_url, default_tz_info)

The session class used for parsing the RSS2.0 feed.

default_tz_info = None

(str) The default time zone name to set the tzinfo of parsed :class: datetime.datetime object.

feed_url = None

(str) The url of the feed to make :class: ~libearth.feed.Link object of which relation is self in the feed.

libearth.parser.rss_base.guess_default_tzinfo(root, url)

Guess what time zone is implied in the feed by seeing the TLD of the url and its <language> tag.