Skip to content

Instantly share code, notes, and snippets.

View ScMofeoluwa's full-sized avatar
🏠
Working from home

Mofeoluwa ScMofeoluwa

🏠
Working from home
View GitHub Profile
@prettyirrelevant
prettyirrelevant / clean_html.py
Created November 24, 2020 14:38
a python script to clean an input of html and return just text
class ParseHTML(HTMLParser):
def __init__(self):
super().__init__()
self.reset()
self.strict = False
self.convert_charrefs = True
self.text = StringIO()
def handle_data(self, d):
self.text.write(d)