I'm curious whether is it possible to get next sibling only when is there some in the same level.
<font face="Arial, Helvetica" size="2"><b>Current:</b>
90
<b>Increment : </b> 5<br>
<b>End Date/Time : </b>06/08/2015 21:00<br>
<b>Last Made at : </b><font size="1"><br></font>
<font ....
So the point is that sometimes there is a text after Last Made at : </b>
but sometime there is not.
I do this:
soup.find('b',text='Last Made at : ').next_sibling
The problem is that if there is not another sibling after </b>
tag, it returns some data from another <font>
tag which I don't want.
I know that it would be possible to use font.contents
but in my case would be the better option something like
`tag.next_sibling_in_the_same_level_or_None`
I didn't find the option so I'm asking whether is there something which could help me in this case.
` is located at the same level as ``. – har07 Aug 04 '15 at 05:37