Skip to content

Instantly share code, notes, and snippets.

@nik012003
Last active September 3, 2022 11:56
Show Gist options
  • Select an option

  • Save nik012003/942dc0f79d1fef8322e43eab26696857 to your computer and use it in GitHub Desktop.

Select an option

Save nik012003/942dc0f79d1fef8322e43eab26696857 to your computer and use it in GitHub Desktop.
CLI Animesaturn Client

Required tools:

  • fzf
  • curl
  • grep
  • mpv/yt-dlp

Discalmer

I do not condone piracy and I'm not affilitaed in any way shape of form with Animesaturn. Whoever uses this script is held responsible of his actions.

saturnurl="https://www.animesaturn.cc"
search (){
echo "Search on $saturnurl" \
| curl $saturnurl/anime/$(fzf --bind "change:reload( curl --get --data-urlencode key={q} $saturnurl/index.php\?search\=1 2>/dev/null | grep -Po '(link\":\")\K[^\"]*')") 2>/dev/null \
| grep -Po "$saturnurl/ep/[^\"]*" | fzf --sync \
| xargs curl 2>/dev/null | grep -Po "(\/watch\?file=\w+)"
}
watch(){
mpv $saturnurl$1
watch $(curl $saturnurl$1 2>/dev/null | grep -Po "(\/watch\?file=\w+)(?=.*Episodio Successivo)")
}
watch $(search)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment