Answer the question
In order to leave comments, you need to log in
How to formulate a generic expression for XPath?
I'm trying to get the number of views from Avito. Found two options:
1) https://www.avito.ru/novocherkassk/sport_i_otdyh/x...
<div class="item-views">
<!--noindex-->
Просмотров:
<span class="js-show-stat pseudo-link" data-config="{ "type": "item", "url": "/items/stat/562148872" }">всего 121, сегодня 23</span>
<!--/noindex-->
</div>
//*[@id="item"]//div[@class="item-views"]/span/text()
<div class="item-views">
<!--noindex-->
Просмотров: всего 20, сегодня 20
<!--/noindex-->
</div>
//*[@id="item"]//div[@class="item-views"]/text()
Answer the question
In order to leave comments, you need to log in
It looks like this is how it works. Not sure if correct://*[@id="item"]//div[@class="item-views"]|/span
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question