导入XML查询-无法从网站检索数据

问题描述 投票:0回答:1

enter image description here我正在尝试使用 ImportXML 检索出现在品牌名称下方的产品数量。但我收到错误“导入的内容为空”

我使用的代码是 =IMPORTXML("https://www.nykaafashion.com/designers/puma/c/4886?searchType=SearchedFromHistory&internalSearchTerm=Puma","//*[@id="app-container"]/ div[2]/div[2]")

链接:“https://www.nykaafashion.com/designers/puma/c/4886?searchType=SearchedFromHistory&internalSearchTerm=Puma”

尝试检索产品数量 - 请参阅附图。

请帮忙解决。

问候

使用的公式:IMPORTXML("https://www.nykaafashion.com/designers/puma/c/4886?searchType=SearchedFromHistory&internalSearchTerm=Puma","//*[@id="app-container"]/div[2 ]/div[2]")

google-sheets web-scraping google-sheets-formula
1个回答
0
投票

您可以尝试使用以下xpath:

//*[@data-at='plp-product-count']
© www.soinside.com 2019 - 2024. All rights reserved.