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

master
pictuga 2022-01-03 17:51:49 +00:00
parent 9eb19fac04
commit dbdca910d8
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import lxml.html.soupparser
class CustomTreeBuilder(bs4.builder._lxml.LXMLTreeBuilder): class CustomTreeBuilder(bs4.builder._lxml.LXMLTreeBuilder):
def default_parser(self, encoding): 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): def parse(data, encoding=None):