Skip to content

Instantly share code, notes, and snippets.

@ryochack
Created February 19, 2018 11:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryochack/24b360f7652cb831145e8f246d583335 to your computer and use it in GitHub Desktop.
Save ryochack/24b360f7652cb831145e8f246d583335 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# Scrap web pages
#
# Usage:
# $ ./wscrap.sh https:xxx/xxx/
set -eu
DEPTH=8
URL=$1
DOMAIN=$(echo $URL | sed -e 's/^http.*:\/\///' -e 's/\/.*$//')
echo $URL
echo $DOMAIN
wget -p -nH -k -E -r -l $DEPTH -P $DOMAIN $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment