I am parsing an html document using the http://lxml.de/ library. So far I have figured out how to strip tags from an html document In lxml, how do I remove a tag but retain
You can use the strip_elements method to remove scripts, then use strip_tags method to remove other tags:
etree.strip_elements(fragment, 'script') etree.strip_tags(fragment, 'a', 'p') # and other tags that you want to remove