InsideDarkWeb.com

Attempting to import from a XPath, seems to always yield blank information

Currently in my google doc, i’m working on a database for my card worth, and it seems like it doesn’t want to grab the information no matter what xpath i want to attempt.

Website i’m trying to take information available here. *This is the hyperlink i’m feeding

In the top right corner i’m attempting to grab the worth box information, here is current xpaths i’ve attempted

"//a[@id='worthBox']/h4"
"/html/body/div[4]/div[1]/div[2]/form/div[1]/div[2]/div/a/h4"
"/h4"
"/h4[0-20]"
"//a[@id='worthBox'][1]/h4"
"//div[@id='estimate-box']/a/h4"
"//div[@id='estimate-box']/a[1]/h4"

Can someone explain to me why it doesn’t seem to wanna fetch, is it even possible?

Thank you so much for your time and help!

Stack Overflow Asked by Woahthere on November 15, 2021

1 Answers

One Answer

In the URL, the value is put using the Javascript. But IMPORTXML cannot retrieve the result after Javascript was run. IMPORTXML retrieves the HTML without running Javascript. I think that your xpath is the result after Javascript was run. By this, they cannot be used. But it seems that the value you expect can be retrieved other xpath.

Modified xpath:

//input[@id='medianHiddenField']/@value

Sample formula:

=IMPORTXML(A1,"//input[@id='medianHiddenField']/@value")
  • In this case, the URL of https://mavin.io/search?q=Lugia%20NM%209%2F111%20-PSA&bt=sold# put in the cell "A1".

Result:

enter image description here

Reference:

Answered by Tanaike on November 15, 2021

Add your own answers!

Related Questions

URL constructor appends ‘/’ at the end of the url

0  Asked on January 2, 2021 by ayusch-jain

         

Using the AWS EC2 Query API

1  Asked on January 2, 2021 by xliff

     

guidata not updating in MATLAB GUI

3  Asked on January 2, 2021 by matias-andina

       

Change long click delay

7  Asked on January 1, 2021 by fhucho

   

Dynamic parameters startWith Rxjs

1  Asked on January 1, 2021 by luden

     

Passing variables from a HTML form to PHP

2  Asked on January 1, 2021 by jim-r

     

trying to reverse the string with “_” fixed at point

3  Asked on December 31, 2020 by saurabh

   

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.