Exemplo n.º 1
0
 def get_text(self, e=None):
     """Returns content of e or the current document as plain text."""
     e = e or self.get_soup()
     return ''.join([
         htmlunquote(c) for c in e.recursiveChildGenerator()
         if isinstance(c, unicode)
     ])
Exemplo n.º 2
0
 def get_text(self, e=None):
     """Returns content of e or the current document as plain text."""
     e = e or self.get_soup()
     return ''.join([htmlunquote(c) for c in e.recursiveChildGenerator() if isinstance(c, unicode)])