How do I get amazon price information into Google Sheets?

半腔热情 提交于 2019-12-08 10:15:50

问题


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?


回答1:


This worked for me:

=importxml(hyperlink(concatenate("AMAZON_URL_HERE")),"//*[@id='priceblock_ourprice']")




回答2:


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



来源:https://stackoverflow.com/questions/25679966/how-do-i-get-amazon-price-information-into-google-sheets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!