Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon price in Google Spreadsheets

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.

like image 282
MultiformeIngegno Avatar asked May 02 '15 15:05

MultiformeIngegno


1 Answers

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.

like image 156
Andrew Anderson Avatar answered Oct 02 '22 23:10

Andrew Anderson