刘明野

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
改完以后保存,再下载会非常的快。

本文为作者刘明野发布,未经允许禁止转载!
7274
1
5
发表留言

    wwp
    6月前

    如何捐赠

友情链接