M
M
macofh2020-07-16 03:09:57
Google Sheets
macofh, 2020-07-16 03:09:57

Which xpath query to create (importxml function)?

There are similar web pages with data. For example: https://www.futbin.com/20/player/43630/roberto-firmino

You need to pull this data from the page, as in the screenshot: https://i.imgur.com/zQwheu9.png

In Google- tables have an importxml function - https://i.imgur.com/h3GpqSZ.png . Is it possible to extract this data with it? If so, what xpath query should be entered?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Grigory Boev, 2020-07-16
@macofh

You can load the script, process and display the result. IMPORTXML is not looking for some reason.
xPath is:
//*[@id="main-pace-val-0"]/div[3]
Here is a link to a demo table . First, we get the HTML code, process it, cut out an informative piece without unnecessary garbage. Then, in the table itself, for example, you can already pull out the data
PS: I did the code in haste, but it works. If you need further assistance, please write to me.

R
robprane, 2020-07-16
@robprane

You can't do this with importxml because the data is not static.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question