2 ms·
I, for one, would use neither CSS nor XPath for that, but my own selector language: <div class=article-section> <div></div> <div class=price>{.}<
by benibela 4y ago
I, for one, would use neither CSS nor XPath for that, but my own selector language:
<div class=article-section>
<div></div>
<div class=price>{.}</div>
</div>
It is the most robust. It picks the price in the article and not some other price that might on the page. And if there is no price, you get an exception that there is no price, rather than an empty result