

def get_formatted(self, top_node):
    'Returns the body text of an article, and also the body article\n        html if specified. Returns in (text, html) form\n        '
    self.top_node = top_node
    (html, text) = ('', '')
    self.remove_negativescores_nodes()
    if self.config.keep_article_html:
        html = self.convert_to_html()
    self.links_to_text()
    self.add_newline_to_br()
    self.add_newline_to_li()
    self.replace_with_text()
    self.remove_empty_tags()
    self.remove_trailing_media_div()
    text = self.convert_to_text()
    return (text, html)

dataset/ETHPy150Open codelucas/newspaper/newspaper/outputformatters.py OutputFormatter.get_formatted/original