Last active
April 7, 2022 02:52
-
-
Save pirafrank/181360a3754abe79a5c8 to your computer and use it in GitHub Desktop.
Quick script that use wget to download an entire website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# != 2 ]]; then | |
echo "Error: wrong number of arguments" | |
echo "" | |
echo "Usage: ./download-entire-website.sh <domain> <url>" | |
echo "Example ./download-entire-website.sh websitetodownload.com www.websitetodownload.com/page/" | |
echo "" | |
exit -1 | |
fi | |
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domain "$1" --no-parent "$2" | |
# Credits to techotopia. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment