From bdef4308feace7d58dc14126eaf4c3ffbed21a83 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 8 Feb 2024 16:11:42 -0800 Subject: [PATCH] Simpler calls to pypandoc --- aider/scrape.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aider/scrape.py b/aider/scrape.py index e6110a2b5..71f0d63b8 100755 --- a/aider/scrape.py +++ b/aider/scrape.py @@ -7,7 +7,6 @@ import httpx import pypandoc from bs4 import BeautifulSoup from playwright.sync_api import sync_playwright -from pypandoc.pandoc_download import download_pandoc from aider import __version__ @@ -111,15 +110,14 @@ class Scraper: if self.pandoc_available: return - html = "" try: - pypandoc.convert_text(html, "markdown", format="html") + pypandoc.get_pandoc_version() self.pandoc_available = True return except OSError: pass - download_pandoc() + pypandoc.download_pandoc() self.pandoc_available = True def html_to_markdown(self, page_source):