Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Usage: gdl <URL> <OUTPUT>
- function gdl() {
- URL=$1
- tmp_file=$(mktemp)
- code=$(wget --save-cookies $tmp_file --keep-session-cookies --no-check-certificate $URL -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
- echo $code
- URL+="&confirm=$code"
- wget --load-cookies $tmp_file $URL -O $2
- rm $tmp_file
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement