def __init__(self, dom: BeautifulSoup) -> None:
self._dom = dom
+ def title(self) -> str | None:
+ span = self._dom.findChild("span", id="post-title")
+ if not isinstance(span, Tag):
+ return None
+ return span.text.strip()
+
def chunkDOMs(self) -> Iterable[Tag]:
def text() -> Tag:
body = self._dom.body