# Playwright mirror (pkg.shecan.ir)

> Mirror of the Playwright browser downloads (PLAYWRIGHT_DOWNLOAD_HOST): Chromium (Chrome for Testing builds), Chromium headless shell, Firefox, WebKit and FFmpeg for playwright install in Node.js, Python, Java and .NET.

- Upstream: cdn.playwright.dev, playwright.download.prss.microsoft.com
- Mirror URL: <https://mirror-playwright.pkg.shecan.ir/>
- Clients: playwright
- Service status: <https://pkg.shecan.ir/status.json> (key `playwright`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/playwright/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/playwright.json>
- Integrity comparison with the official source (audit.shecan.ir, also run by Shecan, open source; group `playwright`, mirror `shecan`): <https://audit.shecan.ir/#playwright>

## Limitations

- The Playwright package itself comes from the npm or PyPI mirror.
- Branded channels (playwright install chrome, msedge) download from Google and Microsoft directly.
- playwright install --with-deps installs system packages with apt or dnf; point those at the Linux distribution mirrors.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### playwright: persistent (user- or system-wide configuration)

Run (linux, macos)

```sh
export PLAYWRIGHT_DOWNLOAD_HOST=https://mirror-playwright.pkg.shecan.ir
npx playwright install chromium
```

Run (windows) (checked by hand)

```powershell
[Environment]::SetEnvironmentVariable('PLAYWRIGHT_DOWNLOAD_HOST', 'https://mirror-playwright.pkg.shecan.ir', 'User')
```

Undo / restore the default (windows) (checked by hand)

```powershell
[Environment]::SetEnvironmentVariable('PLAYWRIGHT_DOWNLOAD_HOST', $null, 'User')
```

Run, Playwright for Python (linux, macos)

```sh
export PLAYWRIGHT_DOWNLOAD_HOST=https://mirror-playwright.pkg.shecan.ir
pip install playwright
playwright install firefox
```

Undo / restore the default (linux, macos)

```sh
unset PLAYWRIGHT_DOWNLOAD_HOST
sed -i.bak -E '/^export (PLAYWRIGHT_DOWNLOAD_HOST)=/d' ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null || true
```
