add new script tor-bay

This commit is contained in:
CoolnsX
2022-05-10 20:25:46 +05:30
parent b44828f158
commit 2227568da1
2 changed files with 28 additions and 13 deletions

16
rss
View File

@@ -1,19 +1,9 @@
#!/bin/sh
#script for downloading latest anime episode via torrent using rss provided by website named "subsplease.org"
#parsing rss file
notify-send -t 2000 "Parsing SubsPlease RSS... Please Wait..."
tmp=$(notify-send -t 2000 "Parsing SubsPlease RSS... Please Wait..." -p)
data=$(curl -s "https://subsplease.org/rss/?r=1080" | tr "<|>" "\n")
#extracting names and providing the menu for selecting particular title
name=$(printf "%s" "$data" | sed -nE 's/^\[.*Please\] (.*)/\1/p' | dmenu -l 25 -p "Search anime:")
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" && exit 0
#extracting id from anime_name_[id].mkv
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" -r $tmp && exit 0
id=$(printf "$name" | sed -n -e 's/.*\[\(.*\)\].*/\1/p')
#finding the magnet link containing the exact pattern
magnet=$(printf "%s" "$data" | grep "$id%" | sed 's/amp;//g')
#custom script for downloading torrent using aria2c.. you can use your own bittorrent client here
st -e $HOME/repos_scripts/torrent "$magnet" &
setsid -f st -e $HOME/repos_scripts/torrent "$magnet"