新兴渲染工具playwright
1.源码地址:https://github.com/microsoft/playwright
python 版本: https://github.com/microsoft/playwright-python
1.特性
1. 速度快, 是Selenium的好几倍;
2. 支持异步运行;
3. 自动等待API;
4. 可拦截请求,随意mock。
注意:
1. Playwright是一款Python第三方库工具,需具备Python3.7及以上环境。
2.代码录制
在命令行使用输入
playwright codegen
输出录制代码
playwright codegen --target python -o baidu.py https://www.baidu.com
评论区