add strip for result.

This commit is contained in:
刘棒棒 2024-01-24 10:52:30 +08:00
parent d60a4c1cdb
commit ff5e7deb21

View file

@ -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()}