亚马逊在Google Spreadsheets中的价格 [英] Amazon price in Google Spreadsheets

查看:163
本文介绍了亚马逊在Google Spreadsheets中的价格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了下面的答案,在这里

a>,但我得到错误导入的Xml内容无法解析



以下是我尝试过的:



= importXml(http://www.amazon.it/Asus-GeForce-Scheda-Display-Edition/dp/B00SKWIISQ/, / / code>


$ b

= importxml(超链接(concatenate( http://www.amazon.it/Asus-GeForce-Scheda-Display-Edition/dp/B00SKWIISQ/ )), // * [@ id中= 'priceblock_ourprice'])



没有一个能够正常工作。



编辑:这些功能是间歇性的。似乎亚马逊网站有一个特定的问题,有时这是有效的,有时它不会(我得到导入的内容不能被解析)。如果没有,有时如果我添加或删除尾部斜线,它会再次运行。其他网站没有问题。似乎存在一个已知问题: https://productforums.google.com/forum/# !topic / docs / UuMGRl7Asew https://productforums.google。 com / forum /#!topic / docs / yWPaNDK0Kpg
原因是什么。

解决方案

如果您尝试 // * xPath,那么您会看到亚马逊正在进行机器人检查。这是解析不成功的原因。



不幸的是,我看不到明显的解决方法。



<而且,至于将逗号更改为分号,反之亦然 - 它不起作用,因为它取决于Google Spreadheet的本地设置,您必须在函数中使用该分隔符。对于一些国家来说,这是一个逗号,对于其他国家来说,这是一个分号。


I tried following the answers gave here, but I get the error Imported Xml content can not be parsed.

Here's what I tried:

=importXml("http://www.amazon.it/Asus-GeForce-Scheda-Display-Edition/dp/B00SKWIISQ/","//span[@id='priceblock_ourprice']")

=importxml(hyperlink(concatenate("http://www.amazon.it/Asus-GeForce-Scheda-Display-Edition/dp/B00SKWIISQ/")),"//*[@id='priceblock_ourprice']")

None of them worked..

EDIT: The functions are intermittently working. Seems there's an issue specifically with the Amazon site as sometimes this works, sometimes it doesn't (and I get "imported content cannot be parsed"). When it doesn't, sometimes if I add or remove the trailing slash it works again. No problem with other sites. Seems a known issue: https://productforums.google.com/forum/#!topic/docs/UuMGRl7Asew https://productforums.google.com/forum/#!topic/docs/yWPaNDK0Kpg What's a mistery is the cause.

解决方案

if you try //* xPath, then you'll see that Amazon is making a robot check. That is the reason of unsuccessful parsing.

Unfortunately, I can't see the obvious way to overcome this.

And, as to changing comma to semicolon and vice versa - it doesn't work, because it depends on your local settings for Google Spreadheet, which delimiter you have to use in functions. For some countries it's a comma, for others it's a semicolon.

这篇关于亚马逊在Google Spreadsheets中的价格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆