Skip to content

Instantly share code, notes, and snippets.

@ziozzang
Forked from matiskay/streamza.sh
Created May 28, 2018 14:23
Show Gist options
  • Save ziozzang/0e1fc24e92474c32d026680f4215966b to your computer and use it in GitHub Desktop.
Save ziozzang/0e1fc24e92474c32d026680f4215966b 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