Skip to content

Instantly share code, notes, and snippets.

@chenyukang
Last active June 14, 2023 14:14
Show Gist options
  • Save chenyukang/2afa1969f532c9f848b6c76f0374391f to your computer and use it in GitHub Desktop.
Save chenyukang/2afa1969f532c9f848b6c76f0374391f to your computer and use it in GitHub Desktop.
Backup website with mirror

use wget to download website

wget --reject-regex "(.*)\?(.*)" --mirror --no-parent --convert-links -p -U Mozilla https://program-think.blogspot.com/

replace abs path to relative path

find . -type f -name '*.html' -exec sed -i '' 's|https://program-think.blogspot.com/|/|g' {} +

run local server to read it

python3 -m http.server
@zdrjson
Copy link

zdrjson commented Jun 14, 2023

1.下载到本地后,后面网站更新了,如何增加更新?
2.如何通过增加的域名然后部署在服务器上?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment