I want to delete the specific div from soup object. I am using python 2.7 and bs4.
div
soup
python 2.7
bs4
According to documentati
from BeautifulSoup import BeautifulSoup >>> soup = BeautifulSoup('12') >>> for div in soup.findAll('div', 'comment'): ... div.extract() ... 2 >>> soup 1