Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml Google表单中的Xpath选择类错误_Xml_Xpath_Google Sheets - Fatal编程技术网

Xml Google表单中的Xpath选择类错误

Xml Google表单中的Xpath选择类错误,xml,xpath,google-sheets,Xml,Xpath,Google Sheets,我正试图从Camelmel上亚马逊热门商品的列表中提取价格 我可以使用以下代码从页面轻松获取项目链接: =IMPORTXML("https://camelcamelcamel.com/popular","//*[@class='current_price']") 但不管我做什么,我似乎都得不到这个价格。我尝试过的每件事都失败了,具体的XPath和非常一般的XPath都像上面的一样 我可以用这个公式得到价格: =IMPORTXML(“https://camelcamelcamel.com/pop

我正试图从Camelmel上亚马逊热门商品的列表中提取价格

我可以使用以下代码从页面轻松获取项目链接:

=IMPORTXML("https://camelcamelcamel.com/popular","//*[@class='current_price']")

但不管我做什么,我似乎都得不到这个价格。我尝试过的每件事都失败了,具体的XPath和非常一般的XPath都像上面的一样

我可以用这个公式得到价格:
=IMPORTXML(“https://camelcamelcamel.com/popular“,”//div[@class='current_price'])”

结果不稳定,有时显示
N/A

重新加载页面一段时间后,我得到:


我可以通过以下公式获得价格:
=IMPORTXML(“https://camelcamelcamel.com/popular“,”//div[@class='current_price'])”

结果不稳定,有时显示
N/A

重新加载页面一段时间后,我得到:

=FILTER(IMPORTXML("https://camelcamelcamel.com/popular","//h3/a/@href"),REGEXMATCH(IMPORTXML("https://camelcamelcamel.com/popular","//h3/a/@href"),"/product/"))