This commit is contained in:
CoolnsX
2022-08-11 01:22:11 +05:30
parent 2227568da1
commit 94e91f3cf5
10 changed files with 61 additions and 38 deletions

8
rss
View File

@@ -1,9 +1,9 @@
#!/bin/sh
tmp=$(notify-send -t 2000 "Parsing SubsPlease RSS... Please Wait..." -p)
data=$(curl -s "https://subsplease.org/rss/?r=1080" | tr "<|>" "\n")
name=$(printf "%s" "$data" | sed -nE 's/^\[.*Please\] (.*)/\1/p' | dmenu -l 25 -p "Search anime:")
data=$(curl -s "https://subsplease.org/rss/?r=1080" | sed 's/<item>/\n/g')
name=$(printf "%s" "$data" | sed -nE 's_^.*Please\] (.*)</title>.*size>(.*)</subs.*_(\2) > \1_p' | dmenu -l 25 -p "Search anime:")
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" -r $tmp && exit 0
id=$(printf "$name" | sed -n -e 's/.*\[\(.*\)\].*/\1/p')
magnet=$(printf "%s" "$data" | grep "$id%" | sed 's/amp;//g')
id=$(printf "$name" | sed -nE 's/.*\[(.*)\].*/\1/p')
magnet=$(printf "%s" "$data" | sed -nE "s_.*<link>(.*$id.*)</link>.*_\1_p" | sed 's/amp;//g')
setsid -f st -e $HOME/repos_scripts/torrent "$magnet"