I'd like to know if there's a library or some method in Python to extract an element from an HTML document. For example:
I have this document:
<html>
<head>
...
</head>
<body>
<div>
...
</div>
</body>
</html>
I want to remove the <div></div>
tag block along with the block contents from the document and then it'll be like that:
<html>
<head>
...
</head>
<body>
</body>
</html>