CLN/ENH: fix the failed lxml parse and allow fallback