async def get_all_visible_text(page: Page) -> str:
"""
Get all the visible text on the page.
:param page: Page instance to get the text from.
:return: All the visible text on the page.
"""
js_script = "() => document.body.innerText"
return await page.evaluate(js_script)
11-08
9620
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-05
1056
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-02
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交