mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
code cleanup
This commit is contained in:
1
ani-new
1
ani-new
@@ -10,6 +10,7 @@ decrypt_link() {
|
||||
curl -s -H "X-Requested-With:XMLHttpRequest" -H "User-Agent:$agent" -H "Referer:https:$1" "$ajax_url" -d "id=$ajax" -d "time=69420691337800813569" | jq -r '.source[].file' | head -4 | tail -1
|
||||
}
|
||||
|
||||
notify-send -t 1000 "parsing gogoanime.... please wait!!"
|
||||
url=$(curl -s -A "$agent" "https://gogoanime.film" | sed -nE 's/.*"name".*href="\/([^"]*)".*/\1/p' | dmenu -p "Select anime:")
|
||||
[ -z "$url" ] && notify-send -u critical "Err.. no anime selected" && exit 0
|
||||
refr=$(curl -s -A "$agent" "https://gogoanime.film/$url" | sed -n -E 's/^[[:space:]]*<a href="#" rel="100" data-video="([^"]*)".*/\1/p')
|
||||
|
||||
4
rss
4
rss
@@ -2,7 +2,7 @@
|
||||
|
||||
#script for downloading latest anime episode via torrent using rss provided by website named "subsplease.org"
|
||||
#parsing rss file
|
||||
notify-send "Parsing SubsPlease RSS... Please Wait..."
|
||||
notify-send -t 2000 "Parsing SubsPlease RSS... Please Wait..."
|
||||
curl -s https://subsplease.org/rss/?r=1080 | tr "<" "\n" > $HOME/.cache/rss
|
||||
|
||||
#extracting names and providing the menu for selecting particular title
|
||||
@@ -16,4 +16,4 @@ id=$(printf "$name" | sed -n -e 's/.*\[\(.*\)\].*/\1/p')
|
||||
magnet=$(sed -n -e "s/link>\(.*$id.*\).*/\1/p" .cache/rss | sed 's/amp;//g')
|
||||
|
||||
#custom script for downloading torrent using aria2c.. you can use your own bittorrent client here
|
||||
setsid -f st -e $HOME/repo_scripts/torrent "$magnet"
|
||||
st -e $HOME/repos_scripts/torrent "$magnet" &
|
||||
|
||||
7
torrent
7
torrent
@@ -9,10 +9,11 @@ c_reset="\033[0m"
|
||||
down(){
|
||||
tput reset
|
||||
notify-send "Torrent: Downloading"
|
||||
aria2c -d movies --select-file=$2 --seed-time=0 $1 && notify-send "Torrent: Download complete" && rm -f $file || notify-send -u critical "Torrent: Error!!" }
|
||||
aria2c -d movies --select-file=$2 --seed-time=0 $1 && notify-send "Torrent: Download complete" && rm -f $file || notify-send -u critical "Torrent: Error!!"
|
||||
}
|
||||
|
||||
trap "rm -f $HOME/.cache/*.torrent;exit 0" INT HUP
|
||||
[ -z "$*" ] && magnet=$(xclip -out clipboard) || magnet=$*
|
||||
[ -z "$*" ] && magnet="$(xclip -out clipboard)" || magnet="$*"
|
||||
echo "$magnet"
|
||||
printf "${c_yellow}Download>>\n${c_green}[f]ull torrent\n${c_cyan}[p]artial torrent \n${c_red}[q]uit"
|
||||
printf "${c_reset}\n\tenter choice:"
|
||||
@@ -29,5 +30,5 @@ case $ch in
|
||||
down "$HOME/.cache/*.torrent" "$ind"
|
||||
rm -f $HOME/.cache/*.torrent;;
|
||||
q)
|
||||
break;;
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user