网站截图实用程序
corona的Python项目详细描述
Corona本质上是一个基本的网页截图实用程序 通过Pyppeteer使用无头铬。
运行
# Download a version of Chromium to use corona setup # Take a snapshot corona snap https://google.com google.png
故障排除
根据执行环境的不同,您可能需要禁用 镀铬沙盒。为此,添加--disable-sandbox参数;但是, 请注意这样做的风险。
分机
应用程序通过python允许几个扩展点 遵循此格式的脚本:
asyncdefpre_snapshot(page):# Do something awesome just before the# snapshot hereasyncdefpost_snapshot(page):# Do something even more awesome after# the snapshot has been taken