soup = self.index_to_soup(raw_html) text = [ self.tag_to_string(tag) for tag in soup.findAll(['h1', 'p'])] text = '\n'.join(text)