步骤1
验证Python环境,需3.7以上版本。(python环境请查找python安装教程)
步骤2
安装Playwright
pip install playwright
步骤3
安装Playwright内置浏览器
python -m playwright install
注意:win7无法安装最新版浏览驱动,报错
更换下载版本
playwright的版本问题,win7最高支持1.15.3。因此,安装playwright依赖库应指定版本,不能装最新版
pip install playwright==1.15.3
下载完成后,再执行以下命令
python -m playwright install
步骤3
安装完成验证
playwright -V