From ff5e7deb215d0a5f4014808c12e527e74d7889b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=A3=92=E6=A3=92?= Date: Wed, 24 Jan 2024 10:52:30 +0800 Subject: [PATCH] add strip for result. --- metagpt/tools/libs/web_scraping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/tools/libs/web_scraping.py b/metagpt/tools/libs/web_scraping.py index e8e73f123..921fca809 100644 --- a/metagpt/tools/libs/web_scraping.py +++ b/metagpt/tools/libs/web_scraping.py @@ -19,4 +19,4 @@ async def scrape_web_playwright(url, *urls): web = await PlaywrightWrapper("chromium").run(url, *urls) # Return the inner text content of the web page - return {"inner_text": web.inner_text, "html": web.html} + return {"inner_text": web.inner_text.strip(), "html": web.html.strip()}