Offline website cloner, updater, and packager
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webcloner-1.0.2.tar.gz.
File metadata
- Download URL: webcloner-1.0.2.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
180789ddc3414d8cc6fb26514ac2518c7b56f9749ab8594d7886b4692756ec31
|
|
| MD5 |
e63c40110ffe798fd1cc4289d2b3883e
|
|
| BLAKE2b-256 |
f78216d115be7e6b31388986d817d5fec9d2b07dda2674acbb8cc5b3c5a92cab
|
File details
Details for the file webcloner-1.0.2-py3-none-any.whl.
File metadata
- Download URL: webcloner-1.0.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e12cc7054044e29dc6e03397db24c8835a7d17697256744fc2884b54435d61b
|
|
| MD5 |
67e36a2df49d81db1bcc884c2ecce8c2
|
|
| BLAKE2b-256 |
7bc2804a0057b16ab1d145f463c2eb8a7443b4fce7f8bb56ec92dfeea2a4400f
|