playwright install 加速
playwright默认会从Azure https://playwright.azureedge.net 下载,国内网访问大多时间很慢的。
这时候可以找到playwright的源码,搜索这个网址,可以发现是在/lib/python3.8/site-packages/playwright/driver/package/lib/server/registry/index.js文件中
只要将const PLAYWRIGHT_CDN_MIRRORS变量中的3个值都改成国内的镜像就可以,比如
https://registry.npmmirror.com/-/binary/playwright
改完以后保存,再下载会非常的快。
太酷啦
如何捐赠