如果我将 BeautifulSoup4 与
lxml
我会用它通过 XPath 查找元素。 BeautifulSoup4 本身不支持 XPath
lxml_root = etree.fromstring(str(raw_soup).encode())