Created
February 23, 2018 09:38
-
-
Save Keda87/b5e6e26dadadcd384a8fb73529186f9a to your computer and use it in GitHub Desktop.
Clean up html tags within text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def clean_html(content): | |
import re | |
TAG_RE = re.compile(r'<[^>]+>') | |
return TAG_RE.sub('', content).strip() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment