Page 1 of 1

Xpath for changing text

Posted: Tue Oct 10, 2017 12:39 am
by wuptii999
Hello.

I am trying to create a Google Sheets doc that automaticly imports prices from a url on futbin.com.

Here is an example URL: https://www.futbin.com/18/player/60/Schmeichel/

On the page im trying to get the top price for PS4, im using the formular:

=importxml(https://www.futbin.com/18/player/60/Schmeichel/, "//span[@id='ps-lowest-1']/text()")

But i only get a "-" in the colum.

Hopefully someone can tell me what im doing wrong here :)

Re: Xpath for changing text

Posted: Tue Oct 10, 2017 9:47 am
by adrian
Hi,

The XPath is fine, the problem is the XML source. Check the result of importxml(), it seems to be replacing all values with '-'.
Later Edit: It's not importxml() that causes this, it's most likely the web server that doesn't serve you the values in the first place. It's either some kind of data protection or the values are actually retrieved by JavaScript code which isn't running if you just import the HTML.

Regards,
Adrian