Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question