using html5lib for parsing HTML documents instead of lxml parsers and tidy