I
I
I_ChUdO_I2017-11-25 16:35:02
Parsing
I_ChUdO_I, 2017-11-25 16:35:02

How to compose XPath for selection with a condition?

Good day.
Help me write an XPath query that will highlight in the list of songs those whose duration exceeds a few seconds. For example 200 sec in this album https://music.yandex.ru/album/4712278

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Fov, 2017-11-25
@I_ChUdO_I

For example, you can:

//div[starts-with(@class, 'track track_selectable') and ((number(substring-before(div[@class='track__info track__nohover']/span[3]/text(), ':')) * 60) + number(substring-after(div[@class='track__info track__nohover']/span[3]/text(), ':'))) > 200]/*[@class='track__name']//h1/a/text()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question