Skip to content

Instantly share code, notes, and snippets.

@zvchei
Last active August 14, 2026 15:38
Show Gist options
  • Select an option

  • Save zvchei/5000759c9df3ddbb78e00716b18a94b6 to your computer and use it in GitHub Desktop.

Select an option

Save zvchei/5000759c9df3ddbb78e00716b18a94b6 to your computer and use it in GitHub Desktop.
Simple website downloader
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: $0 <URL>"
exit 1
fi
URL="$1"
DOMAIN=$(echo "$URL" | awk -F/ '{print $3}' | sed 's/^www\.//')
wget --mirror \
--convert-links \
--adjust-extension \
--page-requisites \
--no-parent \
--no-clobber \
--no-timestamping \
--wait=2 \
--random-wait \
--tries=3 \
--domains="$DOMAIN" \
"$URL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment