如何将亚马逊价格信息存入Google表格? [英] How do I get amazon price information into Google Sheets?
问题描述
在旧版Google电子表格中,可以使用以下公式完成:
= value(importXml( http://www.amazon.com/<你的url在这里>,// b [@ class ='priceLarge']))
然而,在Google电子表格的新版本中,这是行不通的。
现在该怎么做?
您必须更换a;以使其工作:
= importxml(超链接(concatenate(AMAZON_URL_HERE));// * [@ id ='priceblock_ourprice'])
您也可以指定元素,如下所示:
= importXml(AMAZON_URL_HERE;// span [@ id =' priceblock_ourprice'])
语法解释如下:
http://www.w3schools.com/xpath/xpath_syntax.asp
In the old version of Google spreadsheets, this could be done with the following formula:
=value(importXml("http://www.amazon.com/<your url here>", "//b[@class='priceLarge']"))
However, in the new version of Google spreadsheets, this does not work
How is this to be done now?
You have to replace the , by a ; to make it work:
=importxml(hyperlink(concatenate("AMAZON_URL_HERE"));"//*[@id='priceblock_ourprice']")
You can also specify the element, like this:
=importXml("AMAZON_URL_HERE";"//span[@id='priceblock_ourprice']")
The Syntax is explained here:
http://www.w3schools.com/xpath/xpath_syntax.asp
这篇关于如何将亚马逊价格信息存入Google表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!