scraper
scraper copied to clipboard
How to select in pairs?
How to select only pre.CCC with "Hello, Rust!" immediately before it, in the code below?
<section id="AAA">
<p class="BBB">Hello, Rust!</p>
<pre class="CCC">...</pre> ----------> O
<p>...</p>
<pre class="CCC">...</pre> ----------> X
</section>
Did you try p.BBB + pre.CCC which selects the pre.CCC if it is immediately preceded by p.BBB? If you try select based on Hello, Rust!, then this not yet possible with CSS selectors AFAIK.