Skip to main content

Wayback-Archive banner

Download complete websites from the Wayback Machine for offline viewing.

PyPI Build License GitHub Stars codecov


Wayback-Archive is a Python tool that downloads archived websites from the Wayback Machine and reconstructs them for fully functional offline viewing. It preserves all assets -- HTML, CSS, JavaScript, images, and fonts -- rewrites URLs to relative paths, and cleans up Wayback Machine artifacts so the result looks like the original site. Unlike wget --mirror or httrack, it understands Wayback Machine URLs.

Features

  • Downloads HTML, CSS, JS, images, fonts and every linked asset, following links in HTML, CSS and JS.
  • Rewrites every link to a relative path so the copy works from a local server.
  • Tries up to three other Wayback Machine timestamps (a day either side and a week earlier) when a resource returns 404.
  • Replaces a capture that is an archived error or a Cloudflare challenge page with the nearest good capture.
  • Saves Google Fonts locally, and removes corrupted fonts (HTML error pages served as fonts).
  • Falls back to a CDN for critical libraries such as jQuery.
  • Keeps icon groups, button links and cookie consent popups working.
  • Optional HTML, JS, CSS and image minification, and removal of trackers, ads and external iframes.
  • Configured with environment variables or a .env file.

Quick start

pip install wayback-archive
WAYBACK_URL="https://web.archive.org/web/20250417203037/http://example.com/" wayback-archive
cd output && python3 -m http.server 8000   # then open http://localhost:8000

Needs Python 3.10 or newer. The source install and every setting are in Getting started.

Documentation

The documentation is published as a site at geiserx.github.io/Wayback-Archive. The same pages on GitHub:

Wayback-Diff, Way-CMS, web-mirror, media-download, n8n-nodes-way-cms (archived). Descriptions are in Related projects.

License

GPL-3.0-or-later

Metadata

Release files for wayback-archive 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wayback-archive 1.5.0
File Size Uploaded
wayback_archive-1.5.0.tar.gz 112.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wayback-archive 1.5.0
File Interpreter ABI Platform
wayback_archive-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 164.9 kB

Release files / wayback_archive-1.5.0.tar.gz

Download URL wayback_archive-1.5.0.tar.gz
Size 112.0 kB
Tags Source
SHA-256 checksum
How to use checksums
21f3b0f223980dc405bfef032ccd50cd8a8a5cfae3e7cd8f1bb69297fa746281
BLAKE2b-256 checksum
How to use checksums
0207f6e53a9e8e744c1d54d9897a406364c7fb648a0470fc90704ba4d2312451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / wayback_archive-1.5.0-py3-none-any.whl

Download URL wayback_archive-1.5.0-py3-none-any.whl
Size 52.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e5394e2d3026f40ab63912890dad246ecff6730a2cfe3ab66a40428a78c8c4e
BLAKE2b-256 checksum
How to use checksums
69973a86e56d78a69c7f7e91a0569e1f9ce8f583f12d7a52ce51ccd1d68c8cb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page