0

I'm trying to get a value embedded in a website page using '=IMPORTXML' in Google Sheets:

Example value I'm trying to capture

Here's what I tried so far: I copied the full xpath in Google Chrome and entered the following in Google Sheets:

=IMPORTXML("https://magiceden.io/marketplace/portals","//html/body/div[2]/div[2]/div[3]/div[2]/div[2]/div[1]/div[1]/div[2]/div[2]/div[2]/div[1]/div[2]/span/text")

But it returns 'N/A' in my google sheets cell, saying it's empty.

I tried to do the same on the Solanafloor website and that did work. Example:

=IMPORTXML("https://solanafloor.com/nft/portals","//html/body/div/div/div/div[1]/main/div/div[4]/div[3]/div[1]/ul/li[1]/strong/span/text()")

In both cases I used 'copy full xpath' in Google Chrome and used that exact value for the formula. Any ideas?

Conal Tuohy
  • 2,561
  • 1
  • 8
  • 15
BMS
  • 1
  • 2
  • Take a look at this [Answer](https://webapps.stackexchange.com/a/115665) – Osm Aug 02 '22 at 06:47
  • Does this answer your question? [Google Sheets importXML Returns Empty Value](https://stackoverflow.com/questions/61470783/google-sheets-importxml-returns-empty-value) – Rafa Guillermo Aug 02 '22 at 07:07
  • 1
    no wayn this site uses javascript that is not compatible with native functions https://webapps.stackexchange.com/questions/115664/how-to-know-if-google-sheets-importdata-importfeed-importhtml-or-importxml-fun – Mike Steelson Aug 02 '22 at 09:47
  • 1
    It is, sadly this means it won't work. But it was indeed due to the javascript on the page. Thanks! – BMS Aug 02 '22 at 09:53

0 Answers0