mirror of
https://github.com/Phantop/dotfiles
synced 2024-12-25 14:46:42 +00:00
5 lines
440 B
Bash
Executable file
5 lines
440 B
Bash
Executable file
#!/bin/bash
|
|
ID="$(echo $1 | sed -n 's#.*\https\:\/\/drive\.google\.com/file/d/\([^.]*\)\/view.*#\1#;p')";
|
|
CODE=$(wget -q --show-progress --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$ID" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
|
|
aria2c --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CODE&id=$ID" -c -x16 -s 16
|