def process_article(self, content): #content = content[content.find('<div class="article-content">'):] matthew = Matthew(content, self.get_raw(content), "article", verbose=self.debug) matthew.remove_js() matthew.set_raw(self.get_raw(matthew.get_content())) matthew.ignore_css() matthew.change() matthew.times() matthew.replace_source_codes() matthew.fix_spelling() matthew.fix_css() matthew.remove_images() return matthew
def process_email(self, content): matthew = Matthew(content, self.get_raw(content), input_type=self.input_type, verbose=self.debug) matthew.ignore_css() matthew.links() matthew.change() if self.debug: print("Second Pass\n") matthew.change() print("Second Pass complete") print("+ Test Raw for replaced content Result = " + str(matthew.get_raw().find("center"))) matthew.preheader() matthew.times() #matthew.replace_source_codes() matthew.fix_spelling() matthew.fix_css() return matthew
def process_email(self, content, source_code=None, country=None): matthew = Matthew(content, self.get_raw(content), input_type=self.input_type, verbose=self.debug, source_code=source_code, country=country) matthew.ignore_css() matthew.links() matthew.change() if self.debug: print("Second Pass\n") matthew.change() print("Second Pass complete") print("+ Test Raw for replaced content Result = " + str(matthew.get_raw().find("center"))) matthew.preheader() matthew.times() if source_code: matthew.replace_source_codes() matthew.raw = self.get_raw(matthew.content) matthew.fix_spelling() matthew.fix_css() return matthew