lxml 根据内部子节点进行定位
html = """

"""

# 定位内部包含特定a节点的 tbody节点
target_tbody = doc.xpath('//tbody[.//a[@id="pid12"]]')

#lxml

via Memos
 
 
Back to Top