I am using selenium in python to scrape a website. Most pages function well, but one exception I can't seem to capture. The html:
<div class="parablock">
<p>De Hoge Raad acht geen termen aanwezig voor een veroordeling in de proceskosten.<span class="linebreak1"> </span></p>
<p>
<span class="emphasis" style="font-weight:bold;">4 Beslissing</span> </p>
<p>De Hoge Raad verklaart het beroep in cassatie ongegrond.</p>
</div>
What I am after is the last bit of text: "De Hoge Raad verklaart het beroep in cassatie ongegrond." The problem is, there are several div's with class parablock. There are also multiple span's with class emphasis.
What there is only one of is the one indicated as "Beslissing". However this is not set as a class or anything. Is there an easy way to scrape the required text matching the string "Beslissing" ?
Or do I have to soup the whole page, turn the thing into a string and Regex everything to get the text after "Beslissing" ?
//div[@class="parablock"]/p[span[contains(., "Beslissing")]]/following-sibling::p.