edit rss, tor-cli script

This commit is contained in:
CoolnsX
2021-12-20 19:53:39 +05:30
parent e78d69e1ea
commit 63476ef91e
2 changed files with 18 additions and 21 deletions

21
rss
View File

@@ -4,20 +4,21 @@
#parsing rss file
notify-send "Parsing SubsPlease RSS... Please Wait..."
curl -s https://subsplease.org/rss/?r=720 | tr "><" ">\n<" > $HOME/.cache/rss
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 -l 25 -p "Search anime:")
if [ -z "$name" ]; then
notify-send -u critical "Err.. Query empty"
else
#changing the name into format string for pattern matching
query=$(printf "$name" | jq -rRs @uri)
#finding the magnet link containing the exact pattern
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
st -e $HOME/repos_scripts/torrent "$magnet" &
exit
fi
#changing the name into format string for pattern matching
query=$(printf "$name" | jq -rRs @uri)
#finding the magnet link containing the exact pattern
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
st -e $HOME/repos_scripts/torrent "$magnet" &