Skip to content

Instantly share code, notes, and snippets.

@matiskay
Created December 26, 2013 20:19
Show Gist options
  • Save matiskay/8138205 to your computer and use it in GitHub Desktop.
Save matiskay/8138205 to your computer and use it in GitHub Desktop.
SESSION_PAGE="https://streamza.com/api/sessions/_login"
COOKIE_FILE="wget-cookies.txt"
USERNAME="USERNAME"
PASSWORD="PASSWORD"
FILE_URL="FILE_TO_DOWNLOAD"
if [[ ! -f $COOKIE_FILE ]]; then
wget --no-check-certificate --keep-session-cookies --save-cookies $COOKIE_FILE --post-data "name=${USERNAME}&password=${PASSWORD}" ${SESSION_PAGE}
fi
wget --load-cookies wget-cookies.txt --continue ${FILE_URL}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment