确保我的无头浏览器位于我的 Playwright + 中的正确位置蟒蛇 + AWS lambda 设置
我之前曾在 JS 中使用过 playwright,因为 npm 包 (playwright-aws-lambda) 为我带来了魔力,所以生活很轻松。
我找不到与 python 类似的东西,所以我想我必须更深入地挖掘,但不知道从哪里开始。
是否有一个包支持 aws-lambda 上的 playwright+python 或为此设置添加无头浏览器的基本解决方案?
了解剧作家的替代包存在,但这不是我们在这个问题中寻找的
I have previously used playwright with JS and life was easy since an npm package (playwright-aws-lambda) did the magic for me.
I cannot find anything similar for python so I guess I have to dig deeper but do not know where to start.
Is there a package to support for playwright+python on aws-lambda or a fundamental solution to add a headless browser for this setup?
Understand that alternatives packages to playwright exists but that is not what we are looking for in this question
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用 python pyppeteer lib 得到了一个解决方案。
问题是 playwright 仅适用于特定版本的 chrome。
下面的代码有效
I got a solution using the python pyppeteer lib.
the problem is that playwright only works with specific versions of chrome.
code below worked
硒。
我不知道你的用例,但我认为硒会涵盖这一切。
如果您仍然想使用 playwright,请查看此存储库:
https://github.com/微软/playwright-python
Selenium.
I don't know about your use case but I think selenium will cover it all.
In case you still want to use playwright, have a look at this repo:
https://github.com/microsoft/playwright-python