Skip to content

Instantly share code, notes, and snippets.

@inchoate
Last active October 10, 2024 13:13
Show Gist options
  • Save inchoate/064435afeb2a68a5bac7c2646463682f to your computer and use it in GitHub Desktop.
Save inchoate/064435afeb2a68a5bac7c2646463682f to your computer and use it in GitHub Desktop.
Simple Site Downloader
#!/bin/zsh

# Usage:
#     ./download_site.sh {URL}


url=$1
output_dir="./sites"

echo "Starting download for: ${url}"
wget --recursive \
  --directory-prefix=$output_dir \
  --level=2 \
  --convert-links \
  --no-parent \
  --adjust-extension \
  --wait=2 \
  --random-wait \
  ${url}
echo "Finished download for: ${url}"

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