MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _BodyTextParser

Class _BodyTextParser

tools/web.py:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15class _BodyTextParser(HTMLParser):
16 def __init__(self) -> None:
17 super().__init__()
18 self._parts: list[str] = []
19
20 def handle_data(self, data: str) -> None:
21 text = data.strip()
22 if text:
23 self._parts.append(text)
24
25 def get_text(self) -> str:
26 return "\n".join(self._parts)
27
28
29def read_html(url: str) -> str:

Callers 1

read_htmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected