This commit is contained in:
CoolnsX
2021-12-10 23:07:56 +05:30
parent 92009ce556
commit 884ea8dff4
3 changed files with 6 additions and 13 deletions

8
rss
View File

@@ -3,17 +3,15 @@
#script for downloading latest anime episode via torrent using rss provided by website named "subsplease.org"
#parsing rss file
printf "Parsing SubsPlease RSS... Please Wait...\n\n"
notify-send "Parsing SubsPlease RSS... Please Wait..."
curl -s https://subsplease.org/rss/?r=720 | tr "><" ">\n<" > $HOME/.cache/rss
#extracting names and providing the menu for selecting particular title
name=$(sed -n -e 's/title>\(\[SubsPlease\].*\)/\1/p' .cache/rss | sed -e 's/\[SubsPlease\] //g' -e 's/(.*//g' | dmenu -p "Search RSS:")
name=$(sed -n -e 's/title>\(\[SubsPlease\].*\)/\1/p' .cache/rss | sed -e 's/\[SubsPlease\] //g' -e 's/(.*//g' | dmenu -l 25 -p "Search anime:")
if [ -z "$name" ]; then
notify-send -u critical "Err.. Query empty"
else
printf "$name\n\n"
#changing the name into format string for pattern matching
query=$(printf "$name" | jq -rRs @uri)
@@ -21,5 +19,5 @@ else
magnet=$(sed -n -e "s/link>\(.*$query.*\).*/\1/p" .cache/rss)
#custom script for downloading torrent using aria2c.. you can use your own bittorrent client here
$HOME/repos_scripts/torrent "$magnet"
st -e $HOME/repos_scripts/torrent "$magnet" &
fi