return html if pandoc is not available

This commit is contained in:
Paul Gauthier 2024-07-18 10:01:50 +01:00
parent 903faa8fef
commit 88214f963b

View file

@ -174,6 +174,9 @@ class Scraper:
soup = slimdown_html(soup)
page_source = str(soup)
if self.pandoc_available:
return page_source
md = pypandoc.convert_text(page_source, "markdown", format="html")
md = re.sub(r"</div>", " ", md)