This is my html tree
<li class="taf"><h3><a href="26eOfferCode%3DGSONESTP-----------" id="pa1">
Citibank <b>Credit Card</b> - Save over 5% on fuel | Citibank.co.in</a>
</h3>Get the IndianOil Citibank <b>Card</b>. Apply Now!
<br />
<a href="e%253DGOOGLE ------">Get 10X Rewards On Shopping</a> -
<a href="S%2526eOfferCode%253DGSCCSLEX ------">Save Over 5% On Fuel</a>
<br />
<cite>www.citibank.co.in/<b>CreditCards</b></cite>
</li>
From this html i need to extract the lines beforeth of < br > tag
line1 : Get the IndianOil Citibank Card. Apply Now!
line2 : Get 10X Rewards On Shopping – Save Over 5% On Fuel
how it would supposed to do in python?
I think you just asked for the line before each
<br/>.This following code will do it for the sample you’ve provided, by striping out the
<b>and<a>tags and printing the.tailof each element whosefollowing-siblingis a<br/>.Yields: