fix web scrape init

This commit is contained in:
yzlin 2024-02-02 20:52:56 +08:00
parent 891e35b92f
commit c6ac7ef8b8

View file

@ -16,7 +16,7 @@ async def scrape_web_playwright(url, *urls):
(dict): The inner text content and html structure of the web page, key are : 'inner_text', 'html'.
"""
# Create a PlaywrightWrapper instance for the Chromium browser
web = await PlaywrightWrapper("chromium").run(url, *urls)
web = await PlaywrightWrapper().run(url, *urls)
# Return the inner text content of the web page
return {"inner_text": web.inner_text.strip(), "html": web.html.strip()}