So apparently you can keep the tag with a the id of "content"
Code:
keep_only_tags = [dict(id=['content'])]
However, is it possible to keep the tag with a
class? As the
class is a built-in word for python, like:
Code:
<div class="content" id="124"></div>