0
votes

I'm trying to scrape data from XML with the function IMPORTXML of Google sheet but the return is empty.

I tried these formulae:

=IMPORTXML("https://www.futbin.com/20/player/42955/", "//span[@id='ps-lowest-1']/text()")

=INDEX(IMPORTXML("https://www.futbin.com/20/player/42955/" , "//div[@class='xbox-lowest-1']"),1,1)

= IMPORTXML("https://www.futbin.com/20/player/42955/", "//*[@id='xbox-lowest-1']")

=IMPORTXML("https://www.futbin.com/20/player/42955/", "//*[@id='xbox-lowest-1']/text()")

I'm trying to extract this value

Maybe the data is generated after by a script or something else.

1
The data on that page is dynamically loaded from another page using jscript. You can get to it using python libraries like requests, but I don't know if you can then load that directly to your sheet using importxml. You may have to write it to a csv file and then import it. - Jack Fleeting

1 Answers

0
votes

you could do:

=QUERY(ARRAY_CONSTRAIN(IMPORTDATA("https://www.futbin.com/20/player/42955/"), 5000, 1), 
 "where lower(Col1) contains 'lowest'")

0

but as you can see there are no numeric values in between those tags because Google Sheets does not support web scraping of JavaScript elements