return parser
-def fetch(url: str, fetcher: Fetcher) -> BeautifulSoup:
- return BeautifulSoup(fetcher.fetch(url), 'html.parser')
+def parse(content: bytes) -> BeautifulSoup:
+ return BeautifulSoup(content, 'html.parser')
def clean(html: BeautifulSoup) -> BeautifulSoup:
texout: IO[bytes],
pandoc: str) -> None:
texout.write(b'\\documentclass{article}\n\\begin{document}\n')
- html = clean(fetch(url, fetcher))
+ html = clean(parse(fetcher.fetch(url)))
for r in replies(html):
texout.write(html_to_tex(pandoc, r))
texout.write(b'\\end{document}\n')