WebCloner
Clone, update, package & serve websites for offline use – all from one tiny Python script.
Made by Synthfax
Features
| Command | What it does |
|---|---|
| clone | Recursively downloads a live site to a local folder and rewrites internal links. |
| run | Fires up a lightweight Flask web server that serves a cloned repo. |
| update | Refreshes an existing repo safely by cloning into a temp dir and syncing changes |
| savewcof | Bundles an entire repo into a single .wcof archive (ZIP under the hood). |
| runwcof | Serves a .wcof file directly – no manual extraction required. |
Additional features:
- Progress bars via tqdm so you’re never in the dark.
- Domain‑locked crawling – stays on the origin host.
- Depth limiter so you don’t mirror the whole internet by accident.
- Pure‑Python – works on Windows, macOS & Linux (incl. WSL & Termux).
Requirements
-
Python ≥ 3.8
-
The following packages (installed automatically via pip):
requestsbeautifulsoup4tqdmflask
Installation
🔌 Install via pip (recommended)
python -m pip install webcloner
(Use python3 instead of python if needed.)
Quick Start
# 1. Clone a website (max 2 levels deep)
webcloner clone https://example.com ./offline_copy --depth 2
# 2. Serve the local copy in your browser
webcloner run ./offline_copy 8000
# 3. Package the local copy into a single .wcof file
webcloner savewcof mysite.wcof ./offline_copy
# 4. Serve directly from a .wcof archive
webcloner runwcof mysite.wcof 8080
Command Reference
clone
webcloner clone <url> <output_dir> [--depth N]
url– starting URL (with http:// or https://).output_dir– local folder for files.--depth– recursion depth (default 2).
Downloads and rewrites same-domain links for offline use.
run
webcloner run <repo_dir> <port> [--host 0.0.0.0]
Serves the cloned site via Flask.
update
webcloner update <url> <repo_dir> [--depth N]
Safely refreshes the repo by syncing changes from the live site.
savewcof
webcloner savewcof <filename.wcof> <dest_dir> <repo_dir>
Bundles the repo into a .wcof ZIP archive.
runwcof
webcloner runwcof <file.wcof> <port> [--host 0.0.0.0]
Extracts and serves from a .wcof archive on the fly.
FAQ
| Question | Answer |
|---|---|
| Why does it download external CDNs? | Only same-domain links are crawled. Some CSS/JS may load CDN assets. |
| Can I clone login-required sites? | Not yet. You’d need to add cookies manually in the script. |
| Is JavaScript executed? | No. This is a static grabber, no JS rendering. |
License
Licensed under the Apache License 2.0 – see LICENSE for full terms.
Metadata
Release files for webcloner 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| webcloner-1.0.2.tar.gz | 10.3 kB | Without provenance | Details for webcloner-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| webcloner-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for webcloner-1.0.2-py3-none-any.whl |
Total release size: 20.8 kB
Release files / webcloner-1.0.2.tar.gz
| Download URL | webcloner-1.0.2.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
180789ddc3414d8cc6fb26514ac2518c7b56f9749ab8594d7886b4692756ec31
|
|
BLAKE2b-256 checksum How to use checksums |
f78216d115be7e6b31388986d817d5fec9d2b07dda2674acbb8cc5b3c5a92cab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Release files / webcloner-1.0.2-py3-none-any.whl
| Download URL | webcloner-1.0.2-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e12cc7054044e29dc6e03397db24c8835a7d17697256744fc2884b54435d61b
|
|
BLAKE2b-256 checksum How to use checksums |
7bc2804a0057b16ab1d145f463c2eb8a7443b4fce7f8bb56ec92dfeea2a4400f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Security for webcloner 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.