Extract from several Elements a specific Element

0

I'm trying to get the Google Play downloads data in XPath. But when I do the query, it gives me a list of the data I want to obtain. But I do not know how to extract only 1 data and not the 5 or 6 that it throws. For example, this is what I am doing, everything I do with Google SpreadSheets.

=IMPORTXML("https://play.google.com/store/apps/details?id=es.lfp.gi.main"; 
"//*/div[2]/span[contains(@class, 'htlgb')]")

This is what it returns to me:

August 23, 2018
30M
10,000,000+
6.5.2001
4.0.3 and up
Flag as inappropriate
Liga de Fútbol Profesional

What I want, is only to extract the number of Downloads that it has had. What step do I need?

    
asked by Fumatamax 06.09.2018 в 11:45
source

1 answer

0

What you need is to add the instance number, you could also use a shorter xPath, for example

=IMPORTXML("https://play.google.com/store/apps/details?id=es.lfp.gi.main","(//span[contains(@class, 'htlgb')])[3]")

    
answered by 06.09.2018 в 20:24