Created
March 13, 2014 04:10
-
-
Save Ricky-Wilson/9521764 to your computer and use it in GitHub Desktop.
remove scripts from html with python beautiful soup 4
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
from bs4 import BeautifulSoup as bs | |
def remove_scripts(soup): | |
[s.extract() for s in soup('script')] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!