I'm trying to use cssselect
on some HTML page parsed by lxml
, but I found that only one parser gives the expected result:
This works just fine:
lxml.html.fromstring("...").cssselect("div.foo")
This returns no results:
lxml.html.html5parser.fromstring("...").cssselect("div.foo")
What's the difference? And can I get cssselect to work with html5parser
?