from bs4.element import Tag
+def _changeTag(tag: Tag, new_name: str) -> Tag:
+ tag.name = new_name
+ return tag
+
+
DOMFilters: List[Tuple[str, Callable[[Tag], Any]]] = [
- ("NoEdit", lambda x: [eb.decompose() for eb in x.find_all("div", class_="post-edit-box")]),
- ("NoFooter", lambda x: [foot.decompose() for foot in x.find_all("div", class_="post-footer")]),
+ ("Strike", lambda x: [_changeTag(span, 's')
+ for span in x.find_all("span", style="text-decoration: line-through;")]),
]