Exemplo n.º 1
0
 def get_attrs(self):
     parsed = self.parsed
     self.title = parsed.get('title', None)
     self.link = parsed.get('link', None)
     self.updated = parsed.get('updated')
     self.author = parsed.get('author', None)
     self.summary = parsed.get('summary', None)
     try:
         raw_data = parsed.content[0].value
         handler = HTMLHandler()
         handler.feed(raw_data)
         self.text = handler.get()
         self.summary_only = False
     except AttributeError:
         self.text = self.summary
         self.summary_only = True
Exemplo n.º 2
0
    def __init__(self, entry, parent):
        """This currently takes the feed entry and takes the info we need,
        discarding the rest."""
        self.title = entry.get("title", None)
        self.link = entry.get("link", None)
        self.updated = entry.get("updated", None)
        self.author = entry.get("author", None)
        self.summary = entry.get("summary", None)
        try:
            raw_data = entry.content[0].value
            handler = HTMLHandler()
            handler.feed(raw_data)
            self.text = handler.get()
            self.summary_only = False
        except AttributeError:
            self.text = self.summary
            self.summary_only = True

        self.parent = parent

        BaseObject.__init__(self)
Exemplo n.º 3
0
    def __init__(self, entry, parent):
        """This currently takes the feed entry and takes the info we need,
        discarding the rest."""
        self.title = entry.get('title', None)
        self.link = entry.get('link', None)
        self.updated = entry.get('updated', None)
        self.author = entry.get('author', None)
        self.summary = entry.get('summary', None)
        try:
            raw_data = entry.content[0].value
            handler = HTMLHandler()
            handler.feed(raw_data)
            self.text = handler.get()
            self.summary_only = False
        except AttributeError:
            self.text = self.summary
            self.summary_only = True

        self.parent = parent

        BaseObject.__init__(self)