-1

I am using the IMPORTXML function in Google sheets to get some product information for some books and it is working when I am accessing information from the main page (like price and title etc.) as shown below:

enter image description here

enter image description here

However I also want to fetch data for used books, which is available in a panel that opens on the right hand side, when I click the used books options which you can see below:

enter image description here

So when I copy the Xpath from from the price in this panel/section, the IMPORTXML function does not work.

enter image description here

I am assuming that this does not work because the panel on the right hand side has a different link to access it but I don't have HTML knowledge so I am not sure how to make this work.

Here is the link to this book that I have used in the example above:

Short Link: shorturl.at/AJLQ8
Full Link: https://www.amazon.com/Ace-Data-Science-Interview-Questions/dp/0578973839/ref=sr_1_1_sspa?crid=1KPOOAYSZZTJ8&keywords=it+textbook&qid=1669937052&sprefix=it+textbook%2Caps%2C372&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyOVlUN1k0N1JQQU9MJmVuY3J5cHRlZElkPUEwMzgwMTY3MVE1S1kySEJHMjZaSiZlbmNyeXB0ZWRBZElkPUEwMjU0MzE0MjkzREM3Q0RLSFpOQiZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

I tried finding the address of that specific panel on the right but unfortunately didn't succeed.

Bruno Guardia
  • 453
  • 4
  • 14

1 Answers1

0

As per checking on the website that you have provided, the data that you are trying to pull is a javascript-rendered webpage, even if you go directly to it's link address it will still render the main page and just pull out the modal using javascript: https://www.amazon.com/gp/offer-listing/0578973839/ref=tmm_pap_used_olp_0?ie=UTF8&condition=used

enter image description here

Which is a limitation of IMPORTXML Function as stated in this article: Limitations of IMPORTXML

Javascript-rendered websites are not supported: this automatically excludes a large amount of websites, as it is common for popular and large websites to be rendered in Javascript.

Note: I am not affiliated with the website/reference, I just found it through research.

Twilight
  • 1,399
  • 2
  • 11