A Playwright script that saves the pages of one website as local HTML files, videos included, plus an nginx config to serve the copy offline.
The site and the page list are set in the code, not by a setting: src/main2.py ships with the placeholder domain www.place.holder and a one-page list (line 34), so you edit it before you build. It runs in Docker and writes the copy to /data.
index.html in a folder named after its URL path (a page with a video as <path>.html).<video> source of a page next to its HTML.sitemap.xml (swap line 34 for return links).nginx/default.conf) that serves the copy with directory listings.git clone https://github.com/GeiserX/web-mirror.git && cd web-mirror
# edit src/main2.py: replace www.place.holder with your site (lines 27, 34, 71, 72) and set the pages on line 34
docker build -t web-mirror . && docker run --rm -v "$PWD/data:/data" web-mirror
On an Apple Silicon Mac, add --platform linux/amd64 to docker build and docker run, and let Docker emulate amd64 with Rosetta (Colima --vz-rosetta, or Docker Desktop's Rosetta setting): the base image exists for amd64 only, and Chromium crashes under QEMU.
The copy lands in ./data. To serve it, run docker run --rm -p 8080:80 -v "$PWD/data:/usr/share/nginx/html:ro" -v "$PWD/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro" nginx:1.29-alpine and open http://localhost:8080. The published image (drumsergio/web-mirror:1.0.2, amd64) carries the placeholder, so it only helps as a base for your own build.
The full documentation is at geiserx.github.io/web-mirror.
src/main2.py, and how to save the whole sitemap| Project | Description |
|---|---|
| Wayback-Archive | Download complete websites from the Wayback Machine with full asset preservation |
| Wayback-Diff | Intelligent web page comparison tool with Wayback Machine support |
| Way-CMS | Simple web CMS for editing HTML/CSS files downloaded from Wayback Archive |
| media-download | Download all media files from any web page into a folder schema |
| n8n-nodes-way-cms (archived) | n8n community node for Way-CMS archived web content management |
Content type
Image
Digest
sha256:d9e26d8c9…
Size
1.7 GB
Last updated
3 days ago
docker pull drumsergio/web-mirror