mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
feat: no more browser :)
This commit is contained in:
parent
104fce46e1
commit
7bd821e050
22
ani-cli
22
ani-cli
@ -137,22 +137,18 @@ while :; do
|
||||
video_url=$(get_links "$selection_id" "$ep_choice")
|
||||
|
||||
case $video_url in
|
||||
*stream*)
|
||||
*streamtape*)
|
||||
BROWSER=${BROWSER:-firefox}
|
||||
printf "Downloadable mp4 not found, stream on browser?[y/N] "
|
||||
read choice
|
||||
case $choice in
|
||||
[yY]) setsid -f $BROWSER "$video_url" >/dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
printf "scraping streamtape.com\n"
|
||||
video_url=$(curl -s "$video_url" | sed -n -E '
|
||||
/^<script>document/{
|
||||
s/^[^"]*"([^"]*)" \+ '\''([^'\'']*).*/https:\1\2\&dl=1/p
|
||||
q
|
||||
}
|
||||
');;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
|
||||
setsid -f mpv "$video_url" >/dev/null 2>&1
|
||||
;;
|
||||
esac
|
||||
|
||||
printf "\nCurrently playing %s episode %d/%d\n" "$selection_id" $ep_choice $last_ep_number
|
||||
printf "[n] next episode\n"
|
||||
|
Loading…
Reference in New Issue
Block a user