def fulltext(html, language='en'):
 from .cleaners import DocumentCleaner
 from .configuration import Configuration
 from .extractors import ContentExtractor
 from .outputformatters import OutputFormatter
 config = Configuration()
 config.language = language
 extractor = ContentExtractor(config)
 document_cleaner = DocumentCleaner(config)
 output_formatter = OutputFormatter(config)
 doc = config.get_parser().fromstring(html)
 doc = document_cleaner.clean(doc)
 top_node = extractor.calculate_best_node(doc)
 top_node = extractor.post_cleanup(top_node)
 (text, article_html) = output_formatter.get_formatted(top_node)
 return text

def fulltext ( html , language = 'en' ) : from . cleaners import DocumentCleaner from . configuration import Configuration from . extractors import ContentExtractor from . outputformatters import OutputFormatter config = Configuration ( ) config . language = language extractor = ContentExtractor ( config ) document_cleaner = DocumentCleaner ( config ) output_formatter = OutputFormatter ( config ) doc = config . get_parser ( ) . fromstring ( html ) doc = document_cleaner . clean ( doc ) top_node = extractor . calculate_best_node ( doc ) top_node = extractor . post_cleanup ( top_node ) ( text , article_html ) = output_formatter . get_formatted ( top_node ) return text
takes article html string input and outputs the fulltext input string is decoded via unicodedammit if needed .