Re: Delete h2 until you reach the next h2 in beautifulsoup

2016-11-06 Thread rosefox911
On Sunday, November 6, 2016 at 1:27:48 AM UTC-4, rosef...@gmail.com wrote: > Considering the following html: > > cool stuff hiid="cool"> zz > > and the following list: > > ignore_list = ['example','lalala'] > > My goal is, while going through the HTML using Beautifulsoup, I find

Delete h2 until you reach the next h2 in beautifulsoup

2016-11-05 Thread rosefox911
Considering the following html: cool stuff hizz and the following list: ignore_list = ['example','lalala'] My goal is, while going through the HTML using Beautifulsoup, I find a h2 that has an ID that is in my list (ignore_list) I should delete all the ul and lis under it