Say I have
<h3></h3>
<h2></h2>
<p></p>
How can I get to the p node from h3
Right now I can only get from doc.css('h3').next_element which doesn't take any arguments and returns the h2 tag.
Is there a way to check node types recursively or is there a method where I can call for example doc.css('h3').next('p')
P.S Of course the HTML I'm parsing is not as simple as the example above.