【问题标题】:Google Sheets ImportXML on Coinmarketcap.comCoinmarketcap.com 上的 Google 表格 ImportXML
【发布时间】:2021-11-26 17:46:18
【问题描述】:

我有一个用于跟踪加密头寸的谷歌表格,我正在使用 ImportXML 从 coinmarketcap.com 获取硬币的当前价格。它们都使用相同的参数集:

  1. 网址https://coinmarketcap.com/currencies//
  2. 完整的 XPath:/html/body/div[1]/div[1]/div/div[2]/div/div[1]/div[2]/div/div[2]/div[1 ]/div/span

公式: =IMPORTXML("https://coinmarketcap.com/currencies/the-sandbox/", "/html/body/div[1]/div[1]/div/div[2]/div/div[1]/ div[2]/div/div[2]/div[1]/div/span", "en US")

这适用于我尝试过的所有硬币,除了 SAND (https://coinmarketcap.com/currencies/the-sandbox/),我不知道为什么。我已经尝试了几乎所有我能想到的路径组合。

有人有什么想法吗?我完全被这个卡住了。

【问题讨论】:

  • 分享一个例子或解释一下“不起作用”的含义可能会很好

标签: google-sheets xpath import google-sheets-formula formula


【解决方案1】:

尝试:

=IMPORTXML("https://coinmarketcap.com/currencies/the-sandbox/"; 
 "//div[@class='priceValue ']")

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-10
    • 1970-01-01
    • 2019-03-15
    • 1970-01-01
    • 2019-06-03
    相关资源
    最近更新 更多