mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
updated
This commit is contained in:
2
tor-cli
2
tor-cli
@@ -63,5 +63,7 @@ fullURL="${baseurl}${url}/"
|
|||||||
curl -s $fullURL -o $cachedir/tmp.html
|
curl -s $fullURL -o $cachedir/tmp.html
|
||||||
magnet=$(grep -Po "magnet.*\" " $cachedir/tmp.html | tr -d \")
|
magnet=$(grep -Po "magnet.*\" " $cachedir/tmp.html | tr -d \")
|
||||||
|
|
||||||
|
echo $magnet > .cache/maglink
|
||||||
|
|
||||||
$HOME/repos_scripts/torrent "$magnet"
|
$HOME/repos_scripts/torrent "$magnet"
|
||||||
|
|
||||||
|
|||||||
11
torrent
11
torrent
@@ -1,11 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -z "$*" ]; then
|
if [ -z "$*" ]; then
|
||||||
magnet="$(xclip -out clipboard)"
|
magnet="$(cat .cache/maglink)"
|
||||||
else
|
else
|
||||||
magnet=$*
|
magnet=$*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "Enter Directory (default:MOVIES) :"
|
||||||
|
read x
|
||||||
|
|
||||||
|
if [ -z "$x" ]; then
|
||||||
|
x="MOVIES"
|
||||||
|
fi
|
||||||
|
|
||||||
notify-send "Torrent:Rukk ja Download ho rha hai"
|
notify-send "Torrent:Rukk ja Download ho rha hai"
|
||||||
echo "$magnet"
|
echo "$magnet"
|
||||||
aria2c -d MOVIES --seed-time=0 "$magnet" && notify-send "Torrent:cheecha download hogyi" || notify-send -u critical "Torrent:cheecha error!!"
|
aria2c -d $x --seed-time=0 "$magnet" && notify-send "Torrent:cheecha download hogyi" || notify-send -u critical "Torrent:cheecha error!!"
|
||||||
|
|||||||
10
youtube
10
youtube
@@ -14,7 +14,7 @@ c_reset="\033[0m"
|
|||||||
#function to download full video
|
#function to download full video
|
||||||
full_video()
|
full_video()
|
||||||
{
|
{
|
||||||
youtube-dl -f best "$1"
|
yt-dlp -f best -o ~/Videos/%(title)s.%(ext)s "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# function to download part of a video and also split it for SNS...
|
# function to download part of a video and also split it for SNS...
|
||||||
@@ -29,10 +29,10 @@ part_video()
|
|||||||
read x
|
read x
|
||||||
printf "\n\n"
|
printf "\n\n"
|
||||||
if [ $x == 'n' ]; then
|
if [ $x == 'n' ]; then
|
||||||
ffmpeg -i $(youtube-dl -f best --get-url "$video") -ss $start -t $dur $HOME/Videos/$(date +%T_%F).mp4
|
ffmpeg -i $(yt-dlp -f best --get-url "$video") -ss $start -t $dur $HOME/Videos/$(date +%T_%F).mp4
|
||||||
else
|
else
|
||||||
out=$(date +%T_%F)
|
out=$(date +%T_%F)
|
||||||
ffmpeg -i $(youtube-dl -f best --get-url "$video") -map 0 -codec copy -f segment -segment_time 30 -ss $start -t $dur $HOME/Videos/${out}_%02d.mp4
|
ffmpeg -i $(yt-dlp -f best --get-url "$video") -map 0 -codec copy -f segment -segment_time 30 -ss $start -t $dur $HOME/Videos/${out}_%02d.mp4
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,9 +45,9 @@ printf "\n${c_reset}Enter choice:${c_green}"
|
|||||||
read choice
|
read choice
|
||||||
case $choice in
|
case $choice in
|
||||||
f)
|
f)
|
||||||
full_video "$x";;
|
full_video "$x" && notify-send "Video saved to Videos Directory" || notify-send -u critical "Error!!! Video not Downloaded";;
|
||||||
p)
|
p)
|
||||||
part_video "$x";;
|
part_video "$x" && notify-send "Video saved to Videos Directory" || notify-send -u critical "Error!!! Video not Downloaded";;
|
||||||
q)
|
q)
|
||||||
break;;
|
break;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user