Advertisement
Guest User

Untitled

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