نشانیها
- PLAYWRIGHT_DOWNLOAD_HOST
https://mirror-playwright.pkg.shecan.ir/
تنظیم
Playwright در Node.js، Python، Java و .NET همین متغیر را میخواند. این خط را در ~/.bashrc یا ~/.zshrc هم بگذارید تا دائمی شود.
Shell
export PLAYWRIGHT_DOWNLOAD_HOST=https://mirror-playwright.pkg.shecan.ir
npx playwright install chromiumPowerShell
[Environment]::SetEnvironmentVariable('PLAYWRIGHT_DOWNLOAD_HOST', 'https://mirror-playwright.pkg.shecan.ir', 'User')PowerShell
[Environment]::SetEnvironmentVariable('PLAYWRIGHT_DOWNLOAD_HOST', $null, 'User')Python
Shell
export PLAYWRIGHT_DOWNLOAD_HOST=https://mirror-playwright.pkg.shecan.ir
pip install playwright
playwright install firefoxShell
unset PLAYWRIGHT_DOWNLOAD_HOST
sed -i.bak -E '/^export (PLAYWRIGHT_DOWNLOAD_HOST)=/d' ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null || trueنکتهها و محدودیتها
- خود بستهٔ Playwright از میرور npm یا PyPI نصب میشود.
- کانالهای
chromeوmsedge(playwright install chrome) مستقیم از Google و Microsoft دانلود میشوند. --with-depsبستههای سیستمی را با apt یا dnf نصب میکند؛ برای آنها از میرور Debian/Ubuntu یا Fedora استفاده کنید.