mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
feat : made scripts universal and much more complicated
This commit is contained in:
18
rss
18
rss
@@ -1,9 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
tmp=$(notify-send -t 2000 "Parsing SubsPlease RSS... Please Wait..." -p)
|
||||
|
||||
if [ "$(uname -o)" = "Android" ]; then
|
||||
os="droid"
|
||||
script_dir="$HOME"
|
||||
else
|
||||
os="linux"
|
||||
script_dir="$HOME/repos_scripts"
|
||||
fi
|
||||
|
||||
. $script_dir/.functions
|
||||
info_$os "Parsing SubsPlease RSS... Please Wait..."
|
||||
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' | bemenu --fn 'Roboto 16' -i -c -W 0.6 -B 3 -l 25 -p "Search anime:")
|
||||
[ -z "$name" ] && notify-send -u critical "Err.. Query empty" -r $tmp && exit 0
|
||||
name=$(printf "%s" "$data" | sed -nE 's_^.*Please\] (.*)</title>.*size>(.*)</subs.*_(\2) > \1_p' | menu_$os "Search Anime: ")
|
||||
[ -z "$name" ] && exit 0
|
||||
id=$(printf "%s" "$name" | sed -nE 's/.*\[(.*)\].*/\1/p')
|
||||
magnet=$(printf "%s" "$data" | sed -nE "s_.*<link>(.*$id.*)</link>.*_\1_p" | sed 's/amp;//g')
|
||||
setsid -f $TERMINAL -e $HOME/repos_scripts/torrent "$magnet"
|
||||
torrent_$os "$magnet"
|
||||
|
||||
Reference in New Issue
Block a user