1、Playwright介绍
Playwright是一个强大的Python库,仅用一个API即可自动执行Chromium、Firefox、WebKit等主流浏览器自动化操作,并同时支持以无头模式、有头模式运行。Playwright提供的自动化技术是绿色的、功能强大、可靠且快速,支持Linux、Mac以及Windows操作系统。
2、Playwright的安装
安装playwright库
pip install playwright
注意:
1>安装Playwright依赖库,需要Python3.7+
2>安装浏览器驱动文件,安装Chromium、Firefox、WebKit等浏览器的驱动文件
python -m playwright install
3、录制生成脚本