SiteCopy GUI 是一个功能强大的网站备份工具,提供图形界面和命令行两种使用方式。它能够完整地复制网站的所有页面、CSS、JavaScript和静态资源,让您可以在本地离线浏览整个网站。
- 🖥️ 图形界面:直观易用的GUI,无需命令行知识
- 🚀 高性能:多线程下载,快速备份大型网站
- 📁 完整备份:保存HTML、CSS、JS、图片等所有资源
- 🔗 链接重写:自动重写内部链接,确保本地浏览正常
- 🌐 多平台支持:Windows、macOS、Linux全平台支持
- ⚙️ 灵活配置:可配置下载深度、线程数等参数
- 📦 一键打包:提供预编译的可执行文件,无需安装Python
从 Releases 页面下载对应平台的预编译版本:
| 平台 | 文件 | 说明 |
|---|---|---|
| Windows | sitecopy-windows-*.zip |
包含CLI和GUI版本 |
| macOS | sitecopy-macos-*.tar.gz |
包含CLI和GUI版本 |
| Linux | sitecopy-linux-*.tar.gz |
包含CLI和GUI版本 |
# 1. 克隆仓库
git clone https://github.com/Threezh1/SiteCopy-gui.git
cd SiteCopy-gui
# 2. 安装依赖
pip install -r requirements.txt
# 3. 运行GUI版本
python gui.py
# 或运行CLI版本
python sitecopy.py --help- 下载并解压对应平台的可执行文件
- 运行
sitecopy-gui(Windows:.exe, macOS/Linux: 可执行文件) - 在界面中输入URL,配置参数,点击"开始下载"
# 基本用法
sitecopy-cli -u "https://example.com"
# 下载整个网站
sitecopy-cli -u "https://example.com" -e
# 使用配置文件批量下载
sitecopy-cli -s "sites.txt"
# 高级选项:深度200,线程30
sitecopy-cli -u "https://example.com" -e -d 200 -t 30| 参数 | 缩写 | 说明 | 默认值 |
|---|---|---|---|
--url |
-u |
要备份的网站URL | 必填 |
--urls |
-s |
包含多个URL的文本文件 | - |
--depth |
-d |
链接爬取深度 | 200 |
--threads |
-t |
下载线程数 | 30 |
--entire |
-e |
下载整个网站(递归) | false |
--output |
-o |
输出目录 | ./output/ |
创建 sites.txt 文件,每行一个URL:
https://example.com
https://another-site.com/blog
http://local-test.dev
output/
├── example.com/
│ ├── index.html
│ ├── css/
│ │ └── style.css
│ ├── js/
│ │ └── main.js
│ └── images/
│ └── logo.png
└── another-site.com/
└── blog/
└── index.html
# 1. 克隆项目
git clone https://github.com/Threezh1/SiteCopy-gui.git
cd SiteCopy-gui
# 2. 创建虚拟环境(推荐)
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
# 3. 安装开发依赖
pip install -r requirements.txt# 构建CLI版本
pyinstaller --onefile --name "sitecopy-cli" sitecopy.py
# 构建GUI版本
pyinstaller --onefile --name "sitecopy-gui" --windowed gui.py
# 带图标的构建(Windows)
pyinstaller --onefile --name "sitecopy-gui" --windowed --icon=assets/icon.ico gui.py# 安装测试依赖
pip install pytest pytest-cov
# 运行测试
pytest tests/ -v
# 带覆盖率报告
pytest tests/ -v --cov=sitecopy --cov-report=html我们欢迎各种形式的贡献!请查看 CONTRIBUTING.md 了解如何参与。
- Fork 本仓库
- 创建功能分支 (
git checkout -b feature/AmazingFeature) - 提交更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 开启一个 Pull Request
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
重要提示:对任何网站的复制都应在取得授权后进行。请遵守目标网站的 robots.txt 规则,尊重版权和隐私。使用者因不当使用本工具造成的任何后果自负,与作者无关。
- 作者:Threezh1
- 博客:http://www.threezh1.com/
- GitHub:@Threezh1
- 邮箱:makefoxm@qq.com
感谢所有为本项目做出贡献的开发者!
如果这个项目对您有帮助,请给个 ⭐ Star 支持一下!
