X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/a18519bf16f2983b139cffaa731d3ea8e900f542..21e82200b2887fc4f4f9eff4023f4a73547cacb5:/glowfic.py diff --git a/glowfic.py b/glowfic.py index 746a7a2..92ae4ab 100644 --- a/glowfic.py +++ b/glowfic.py @@ -59,6 +59,12 @@ class Thread: 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