cleaner.style = True
print('WITH JAVASCRIPT & STYLES')
print(lxml.html.tostring(lxml.html.parse('http://www.google.com')))
print('WITHOUT JAVASCRIPT & STYLES')
print(lxml.html.tostring(cleaner.clean_html(lxml.html.parse(
    'http://www.google.com'))))
Remove all javascript tags and style tags from html with python and the lxml module