Last active
July 1, 2025 10:53
-
-
Save avissian/21fdc360634064ac91a298090fac7ef7 to your computer and use it in GitHub Desktop.
Download video & upload to own cloud (using rclone)
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
| #!/bin/bash | |
| BASE_CMD="yt-dlp -6 $1 --cookies-from-browser=firefox" # use IPv6 only! | |
| CLOUD_DST="yadisk:/Video_yt" | |
| HTTPS_PROXY= #"socks5://127.0.0.1:7890" | |
| HTTP_PROXY=$HTTPS_PROXY | |
| if [[ $2 == "" ]] | |
| then | |
| $BASE_CMD -F | |
| exit 0 | |
| fi | |
| # download | |
| $BASE_CMD -f $2 | |
| # upload | |
| while true; do | |
| read -p "Upload? Y/n " -t 120 yn | |
| case $yn in | |
| ""|[Yy]* ) rclone move -P "$($BASE_CMD -f $2 --get-filename)" "$CLOUD_DST"; break;; | |
| [Nn]* ) exit;; | |
| * ) echo "Y/n?";; | |
| esac | |
| done # upload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment