Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Downloads a local copy of a page w/ all the necessary images, CSS,
- # etc.
- # Doesn't download the scripts, mostly intended for downloading blog posts
- # -p and -k from
- # https://stackoverflow.com/questions/6348289/download-a-working-local-copy-of-a-webpage
- # --reject js to not download scripts
- STD_OPTS="-p -k"
- # comment this out if you wish to download scripts
- NO_DL_SCRIPTS="--reject js"
- SITE_TO_DL="$1"
- # don't use "" for STD_OPTS and NO_DL_SCRIPTS since they're used for opts
- wget $STD_OPTS $NO_DL_SCRIPTS "$SITE_TO_DL"
Advertisement
Add Comment
Please, Sign In to add comment