evennia.server.portal.rss¶
RSS parser for Evennia
This connects an RSS feed to an in-game Evennia channel, sending messages to the channel whenever the feed updates.
-
class
evennia.server.portal.rss.
RSSReader
(factory, url, rate)[source]¶ Bases:
evennia.server.session.Session
A simple RSS reader using the feedparser module.
-
__init__
(factory, url, rate)[source]¶ Initialize the reader.
- Parameters
factory (RSSFactory) – The protocol factory.
url (str) – The RSS url.
rate (int) – The seconds between RSS lookups.
-
disconnect
(reason=None)[source]¶ Disconnect from feed.
- Parameters
reason (str, optional) – Motivation for the disconnect.
-
-
class
evennia.server.portal.rss.
RSSBotFactory
(sessionhandler, uid=None, url=None, rate=None)[source]¶ Bases:
object
Initializes new bots.
-
__init__
(sessionhandler, uid=None, url=None, rate=None)[source]¶ Initialize the bot.
- Parameters
sessionhandler (PortalSessionHandler) – The main sessionhandler object.
uid (int) – User id for the bot.
url (str) – The RSS URL.
rate (int) – How often for the RSS to request the latest RSS entries.
-