mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 15:25:20 +05:30
22 lines
857 B
Bash
Executable File
22 lines
857 B
Bash
Executable File
#!/bin/sh
|
|
|
|
#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"
|
|
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:")
|
|
|
|
printf "$name\n\n"
|
|
|
|
#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
|
|
$HOME/repos_scripts/torrent "$magnet"
|