google-sheets - Google 表格 importXml

标签 google-sheets web-scraping xpath google-sheets-formula

我正在尝试使用来自 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/

相关文章:

javascript - 从 JS 数组中删除非 0 假值的最简单方法是什么?

javascript - 用于格式化电子表格的 Google 脚本制作工具

javascript - XPath 在 Firefox/GreaseMonkey 中阻塞实体

json - 将特定 JSON 字段从 .responseText 提取到单个 Excel 单元格

python - 如何在 bs4 中使用以下分页抓取网站?

xml - 在经典 ASP 中对 XML 数据进行排序

c# - 在 Selenium C# 中选择单选按钮

join - 查询以选择大范围的列,而无需手动输入每列Google表格

google-apps-script - 在 Google Analytics 中跟踪 Google 表格

python - Scrapy 选择器返回页面上的所有内容而不是相对的