Skip to content

Instantly share code, notes, and snippets.

@Ricky-Wilson
Created March 13, 2014 04:10
Show Gist options
  • Save Ricky-Wilson/9521764 to your computer and use it in GitHub Desktop.
Save Ricky-Wilson/9521764 to your computer and use it in GitHub Desktop.
remove scripts from html with python beautiful soup 4
from bs4 import BeautifulSoup as bs
def remove_scripts(soup):
[s.extract() for s in soup('script')]
@mirite
Copy link

mirite commented Nov 3, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment