From db7d717df73f5025c3b852024b3f44c42a94dec0 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 14 Jun 2025 20:00:11 -0700 Subject: [PATCH] Remove images and links from websearch results This reduces noise a lot --- modules/web_search.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/web_search.py b/modules/web_search.py index 5b14be55..401a42bb 100644 --- a/modules/web_search.py +++ b/modules/web_search.py @@ -29,6 +29,8 @@ def download_web_page(url, timeout=10): # Initialize the HTML to Markdown converter h = html2text.HTML2Text() h.body_width = 0 + h.ignore_images = True + h.ignore_links = True # Convert the HTML to Markdown markdown_text = h.handle(response.text)