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
import cssutils | |
from xml.sax import saxutils | |
from lxml.html import tostring, fromstring, clean | |
from lxml import etree | |
import logging | |
class Cleaner(clean.Cleaner): | |
def clean_html(self, html): | |
if not isinstance(html, unicode): |