Google Sheets IMPORTXML XPATH query failure - xpath

Xpath for Google Sheets IMPORTXML query doesn't seem to work:
//*[#id="itempagetradegraphcontainer"]/div/div[1]/div/div/table/tr[56]/td[3]
Link: https://merchos.net/app/item.php?id=1215

Related

How to scrape price from mercari in google sheet using importxml?

I would like to get the "3,776" price in this website.
https://jp.mercari.com/item/m68422230699
I copy the full xpath, but it returs #N/A
=IMPORTXML("https://jp.mercari.com/item/m68422230699","/html/body/div[1]/div[1]/div/div/div/main/article/div[2]/section[1]/section[1]/div/mer-price//span[2]")
#N/A, in this case, is a result of trying to scrape JavaScript content/elements which Google Sheets does not support. you can test this simply by disabling JS for a given site and what's left can be scraped. in your case it's nothing:

Find the Xpath to get data with importxml function

I want to use ImportXML function in google sheets in order to bring some prices into my google sheet, how to find the correct Xpath for this ?
This is the URL: https://super.walmart.com.mx/verduras/aguacate-hass-extra-por-kilo/00000000003354
and im trying to bring the price, in this case is $39.90
I was trying this formula but im getting NA (imported content is empty)
=IMPORTXML("https://super.walmart.com.mx/verduras/aguacate-hass-extra-por-kilo/00000000003354","//*[#id="scrollToTopComponent"]/section/div[1]/div[2]/div[2]/div[3]/h4/text()[1]")
Thanks
IMPORTXML does not work on Javascript content
You can verify that that the URL https://super.walmart.com.mx/verduras/aguacate-hass-extra-por-kilo/00000000003354 content loads via Javascript by
going on your Browser settings
Disable / block Javascript
Refresh your URL
See the following:
So, unfortunately you cannot use IMPORTXML to get the content of this URL.

How to find the correct Xpath to get importxml function work

I'm trying to use ImportXML function in Google sheets in order to bring some prices into my Google sheet, how to find the correct Xpath for this?
This is the URL:
https://www.superama.com.mx/catalogo/d-frutas-verduras/f-frutas/l-naranja-limon-y-citricos/mandarina-por-kilo/0000000003029
and I'm trying to bring the id="lblPrice" which in this case is $24.90
I was trying this formula but I'm getting NA
=IMPORTXML("https://www.superama.com.mx/catalogo/d-frutas-verduras/f-frutas/l-naranja-limon-y-citricos/mandarina-por-kilo/0000000003029","//*[#id="lblPrice"]")
IMOPORTXML/Google Sheets does not support scraping of JavaScript elements.

ImportXML parse error - Wikipedia scraping with excel sheet

I'm trying to scrape little data into an excel sheet from Wikipedia website using the ImportXML formula.
The XPath code I copied which I got it from the browser.
Here is the Wikipedia page. https://en.wikipedia.org/wiki/Chicago
Scraping the Latitude and longitude which is present on the page.
Screenshot:
This is the code that I get from the browser XPath selector.
//*[#id="mw-content-text"]/div/table[1]/tbody/tr[11]/td/span[1]/span/a/span[1]/span/span[1]
Can you help me with the code and help me where I'm doing the wrong?
try:
=INDEX(IMPORTXML("https://en.wikipedia.org/wiki/Chicago", "//span[#class='geo-dms']"), 1)

XPath in Google Sheets producing #N/A

I was currently using this XPath in Google Sheets and it’s now saying imported content is empty.
=IMPORTXML("http://www.sportsline.com/nfl/odds/", "//div[#class='row-group']")
I have an HTML that works, but this table worked best for my other formulas. Any help would be appreciated.

Resources