mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
return html if pandoc is not available
This commit is contained in:
parent
903faa8fef
commit
88214f963b
1 changed files with 3 additions and 0 deletions
|
@ -174,6 +174,9 @@ class Scraper:
|
||||||
soup = slimdown_html(soup)
|
soup = slimdown_html(soup)
|
||||||
page_source = str(soup)
|
page_source = str(soup)
|
||||||
|
|
||||||
|
if self.pandoc_available:
|
||||||
|
return page_source
|
||||||
|
|
||||||
md = pypandoc.convert_text(page_source, "markdown", format="html")
|
md = pypandoc.convert_text(page_source, "markdown", format="html")
|
||||||
|
|
||||||
md = re.sub(r"</div>", " ", md)
|
md = re.sub(r"</div>", " ", md)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue