我正在尝试使用来自 Google 表格的 importXML 在网站上定位价格。我的目标代码如下:
<span class="new_price" id="final_price">£29.99</span>
因为它在类“new_price”中,所以我的导入不起作用:
=importXml("http://www.hardware-ironmongers.com/details.aspx?code=7751913"; "//span[@id='final_price']")
关于如何在类中定位 ID 有什么想法吗?
干杯
最佳答案
我不是专家,但这看起来可能会让您走上正确的道路:
How to select two attributes from the same node with one expression in XPath?
关于google-sheets - Google 表格 importXml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11508641/