Last active
June 14, 2023 14:14
-
-
Save chenyukang/2afa1969f532c9f848b6c76f0374391f to your computer and use it in GitHub Desktop.
Backup website with mirror
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## use wget to download website | |
```bash | |
wget --reject-regex "(.*)\?(.*)" --mirror --no-parent --convert-links -p -U Mozilla https://program-think.blogspot.com/ | |
``` | |
## replace abs path to relative path | |
```bash | |
find . -type f -name '*.html' -exec sed -i '' 's|https://program-think.blogspot.com/|/|g' {} + | |
``` | |
## run local server to read it | |
```bash | |
python3 -m http.server | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.下载到本地后,后面网站更新了,如何增加更新?
2.如何通过增加的域名然后部署在服务器上?