Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.55 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # Downloads a local copy of a page w/ all the necessary images, CSS,
  3. # etc.
  4. # Doesn't download the scripts, mostly intended for downloading blog posts
  5.  
  6. # -p and -k from
  7. # https://stackoverflow.com/questions/6348289/download-a-working-local-copy-of-a-webpage
  8. # --reject js to not download scripts
  9.  
  10. STD_OPTS="-p -k"
  11. # comment this out if you wish to download scripts
  12. NO_DL_SCRIPTS="--reject js"
  13. SITE_TO_DL="$1"
  14.  
  15. # don't use "" for STD_OPTS and NO_DL_SCRIPTS since they're used for opts
  16. wget $STD_OPTS $NO_DL_SCRIPTS "$SITE_TO_DL"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement