【问题标题】:IMPORTXML on google sheets error- Imported content is empty谷歌表格上的 IMPORTXML 错误 - 导入的内容为空
【发布时间】:2023-01-04 02:27:05
【问题描述】:

我想从日本网上商店 mercari 获取价格。

例如,在这个链接中,我喜欢得到 1,488。 https://jp.mercari.com/item/m78226870756

当我复制 xpath 时

 <span class="number">

我明白了

//*[@id="item-info"]/section[1]/section[1]/div[1]/mer-price//span[2]

现在,使用谷歌表 importxml

=IMPORTXML("https://jp.mercari.com/item/m78226870756","//*[@id='item-info']/section[1]/section[1]/div[1]/mer-price//span[2]")

我收到一个

#N/A Imported content is empty.

我真的很想知道如何获得价格。 我一点都不熟悉这个。 也欢迎使用 google sheet 以外的任何其他方式。

【问题讨论】:

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


【解决方案1】:

由于importxml(或任何其他导入)公式不支持报废 JavaScript 元素,您将收到 #N/A 错误。您可以始终通过为给定站点禁用 JS 来测试它,剩下的通常可以导入到谷歌表格中

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-10
    • 2016-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多