]> git.scottworley.com Git - paperdoorknob/blobdiff - paperdoorknob.py
Strip edit-boxes and footers
[paperdoorknob] / paperdoorknob.py
index 6cc76a2f56d465fdf0c897b601dfbaa25dd86d03..fb2df1f1cc1c7443bc6e07018bad7148eb12a5c6 100644 (file)
@@ -21,6 +21,10 @@ from xdg_base_dirs import xdg_cache_home
 class Post:
     def __init__(self, html: BeautifulSoup) -> None:
         self._html = html
+        for eb in self._html.find_all("div", class_="post-edit-box"):
+            eb.decompose()
+        for footer in self._html.find_all("div", class_="post-footer"):
+            footer.decompose()
 
     def text(self) -> Tag:
         body = self._html.body