mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
Remove images and links from websearch results
This reduces noise a lot
This commit is contained in:
parent
e263dbf852
commit
db7d717df7
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue