readabilite: fix new parser code & drop PIs
continuous-integration/drone/push Build was killed Details

master
pictuga 1 year ago
parent 9eb19fac04
commit dbdca910d8

@ -25,7 +25,7 @@ import lxml.html.soupparser
class CustomTreeBuilder(bs4.builder._lxml.LXMLTreeBuilder):
def default_parser(self, encoding):
return lxml.html.HTMLParser(remove_comments=True, encoding=encoding)
return lxml.html.HTMLParser(target=self, remove_comments=True, remove_pis=True, encoding=encoding)
def parse(data, encoding=None):

Loading…
Cancel
Save