I want to delete the specific div from soup object.
I am using python 2.7 and bs4.
According to documentati
This will help you:
from bs4 import BeautifulSoup
markup = 'This is not div This is div 1This is div 2'
soup = BeautifulSoup(markup,"html.parser")
a_tag = soup
soup.find('div',class_='2').decompose()
print a_tag
Output:
This is not div This is div 1
Let me know if it helps