protip: find some useful information on a website? worried it might not be there next time you look? run this command to download it:
wget -pkcE --wait 1 example.org
explanation:
- wget: get something from the web
- p: "page requisites", aka include any images on the page.
- k: convert links on the original page, so that your archived page doesn't look for its images on the real website.
- E: fix extensions. basically this means that if the original page was not .html, it will be converted to .html.
- c: continue. if you interrupt the download you can run this command again and it will continue where it left off.
- wait 1: wait one second between downloads so you don't spam the website with requests. optional, but polite.
you can also add -m if you want to mirror the entire website. this will grab other html files from links and then download their dependencies too. this is probably overkill if you just want to save a blog post, but it's good to know it exists.
based on a tip I found here:
dheinemann.com/archiving-a-website-with-wget/
#website #programming #archive


