Last active
July 19, 2017 15:53
-
-
Save nuryslyrt/2da056c22d99c4fc34b63d67f704491d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python | |
#Regex Example: | |
import re | |
def cleanhtml(raw_html): | |
cleanr = re.compile('<.*?>') | |
cleantext = re.sub(cleanr, '', raw_html) | |
return cleantext | |
#BeautifulSoup Example: | |
from BeautifulSoup import BeautifulSoup | |
cleantext = BeautifulSoup(raw_html).text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment