From 599e18e531a79a046dae81f80c2829a9d43b4835 Mon Sep 17 00:00:00 2001 From: JimboKearn Date: Fri, 16 Jul 2021 17:43:09 +0530 Subject: [PATCH] bypassed captcha --- README.md | 4 ++-- ani-cli | 17 +++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 705ce0e..d3c5d0f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -## **NOT WORKING**: https://gogoanime.vc, has added a captcha to block bots - # ani-cli +This is a fork of pystardust's [old-ani-cli](https://github.com/pystardust/ani-cli/tree/old-ani-cli) + A cli to browse and watch anime. This tool scrapes the site [gogoanime](https://gogoanime.vc). diff --git a/ani-cli b/ani-cli index 56ec476..1c4467b 100755 --- a/ani-cli +++ b/ani-cli @@ -70,19 +70,10 @@ get_links () { dpage_url=$( curl -s "https://gogoanime.vc/$anime_id-episode-$ep_no" | - sed -n -E ' - /^[[:space:]]*
  • /{ - s/.*href="([^"]*)".*/\1/p - q - }') + sed -n -E 's_^[[:space:]]*.*_https:\1_p') curl -s "$dpage_url" | - sed -n -E ' - /^[[:space:]]*href="([^"]*\.mp4)".*/{ - s/^[[:space:]]*href="([^"]*\.mp4)".*/\1/p - q - } - ' + sed -n -E "s/^[[:space:]]*sources:\[\{file\: '([^']*)'.*/\1/p" | sed 1q } dep_ch () { @@ -174,6 +165,8 @@ open_episode () { anime_id=$1 episode=$2 + # clear the screen + printf '\x1B[2J\x1B[1;1H' if [ $episode -lt 1 ] || [ $episode -gt $last_ep_number ]; then err "Episode out of range" printf "${c_blue}Choose episode $c_cyan[1-%d]$c_reset:$c_green " $last_ep_number @@ -311,7 +304,7 @@ while :; do [ "$episode" -eq "$episode" ] 2>/dev/null || die "Invalid number entered" ;; - q) + q) break;; *)