Created
November 9, 2015 10:44
-
-
Save chmouel/302b464bb1eb60fb4a16 to your computer and use it in GitHub Desktop.
Login to LWN
This file contains hidden or 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
#!/usr/bin/env bash | |
LWN_USERNAME=USERNAME | |
LWN_PASSWORD='PASSWORD' | |
LWN_LOGIN_PAGE=http://lwn.net/login | |
LWN_PDF=/tmp/LWN-`date +%d-%m-%Y`.pdf | |
CURL_AGENT="login to lwn" | |
CURL_COOKIEJAR=/tmp/.lwncookies | |
CURL_OPTIONS_LOGIN="-A ${CURL_AGENT} -k -c ${CURL_COOKIEJAR} -L ${LWN_LOGIN_PAGE}?Username=${LWN_USERNAME}&Password=${LWN_PASSWORD}" | |
curl -o/dev/null -s ${CURL_OPTIONS_LOGIN} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment