0

I want to get the price from mercari, a japanese online shop.

For example, in this link, I like to get 1,488. https://jp.mercari.com/item/m78226870756

when I copy the xpath of

 <span class="number">

I get

//*[@id="item-info"]/section[1]/section[1]/div[1]/mer-price//span[2]

Now, using google sheet importxml

=IMPORTXML("https://jp.mercari.com/item/m78226870756","//*[@id='item-info']/section[1]/section[1]/div[1]/mer-price//span[2]")

I receive a

#N/A Imported content is empty.

I would really like to know how to get the price. I am not familiar with this at all. Any other way other than google sheet is also welcome.

Rubén
  • 34,714
  • 9
  • 70
  • 166
djc
  • 1
  • Does this answer your question? [Scraping data to Google Sheets from a website that uses JavaScript](https://stackoverflow.com/questions/74237688/scraping-data-to-google-sheets-from-a-website-that-uses-javascript) – Rubén Jan 03 '23 at 18:27

1 Answers1

0

you are getting #N/A error due to importxml (or any other import) formula does not support the scrapping of JavaScript elements. you can test this always by disabling JS for a given site and what's left can be usually imported into google sheets

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124