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
24
ani-cli
24
ani-cli
@ -137,23 +137,19 @@ while :; do
|
|||||||
video_url=$(get_links "$selection_id" "$ep_choice")
|
video_url=$(get_links "$selection_id" "$ep_choice")
|
||||||
|
|
||||||
case $video_url in
|
case $video_url in
|
||||||
*stream*)
|
*streamtape*)
|
||||||
BROWSER=${BROWSER:-firefox}
|
BROWSER=${BROWSER:-firefox}
|
||||||
printf "Downloadable mp4 not found, stream on browser?[y/N] "
|
printf "scraping streamtape.com\n"
|
||||||
read choice
|
video_url=$(curl -s "$video_url" | sed -n -E '
|
||||||
case $choice in
|
/^<script>document/{
|
||||||
[yY]) setsid -f $BROWSER "$video_url" >/dev/null 2>&1
|
s/^[^"]*"([^"]*)" \+ '\''([^'\'']*).*/https:\1\2\&dl=1/p
|
||||||
;;
|
q
|
||||||
*)
|
}
|
||||||
exit 0
|
');;
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
setsid -f mpv "$video_url" >/dev/null 2>&1
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
setsid -f mpv "$video_url" >/dev/null 2>&1
|
||||||
|
|
||||||
printf "\nCurrently playing %s episode %d/%d\n" "$selection_id" $ep_choice $last_ep_number
|
printf "\nCurrently playing %s episode %d/%d\n" "$selection_id" $ep_choice $last_ep_number
|
||||||
printf "[n] next episode\n"
|
printf "[n] next episode\n"
|
||||||
printf "[p] previous episode\n"
|
printf "[p] previous episode\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user