Closed chbo70 closed 2 years ago
i have same issue at "senpai ga uzai kouhai no hanashi"
same problem
I tried reinstalling ani-cli and reinstalling the dependincies still doesnt work
I am getting this error when I try to watch One Piece, I tried to do a debug, but as I know little about shell script, it didn't work.
When I tried to download, I realize what is the error:
When I remove the dot in the final of URL, he can get the right m3u file.
https://www16.anicdn.stream/astream/c751bab1939a2b83020565e1ac242896/one-piece-episode-1004.1639880060..m3u8
to
https://www16.anicdn.stream/astream/c751bab1939a2b83020565e1ac242896/one-piece-episode-1004.1639880060.m3u8
I don't know much about shell scripting, but the error seems to be in get_links
line 129.
I think he couldn't find the quality of the video.
I will try to make a condition to this at least.
I changed the line 129 with this:
# Replace the video with highest quality video
if [ -z "$video_quality" ];
then printf '%s' "$video_url";
else printf '%s' "$video_url" | sed -n -E "s/(.*)\.m3u8/\1.$video_quality.m3u8/p";
fi
Now Black Cover and One Piece works, but some animes may not work yet.
i did replace it however black clover still doesnt work
well, if i am precise, the first episode works but without sound, all the episodes after that still don't work
There's still an error that I haven't identified yet, I don't think I'll have time to debug this year.
There's still an error that I haven't identified yet, I don't think I'll have time to debug this year.
Bro no worries, already thankful for everything ;)
I changed the line 129 with this:
# Replace the video with highest quality video if [ -z "$video_quality" ]; then printf '%s' "$video_url"; else printf '%s' "$video_url" | sed -n -E "s/(.*)\.m3u8/\1.$video_quality.m3u8/p"; fi
Now Black Cover and One Piece works, but some animes may not work yet.
It helped me to watch One Piece. Thanks a lot )
I looked a little into this issue; it seems like, for at least some of the anime, gogoanime is pointing their videos to a streamsb server. From there, the current script cannot produce a valid href in the get_links function. I have tried looking into getting around this but not getting anywhere. Hopefully, someone with a little more understanding of this can either give advice or solve this themselves with this knowledge in hand.
seeing this issue with at least the following anime: "senpai ga uzai kouhai no hanashi" "mieruko-chan"
@wh1ter4bb1t-js We are in trouble, steamsb
won't let us scrap the video.
I tried an answer on stack overflow, and it still had more walls.
I have a temporary suggestion for this problem, animes that can't find a link will run the xdg-open
command with an embedded_video_url
.
@alt-art I don't mind having a temporary solution like that, in fact, I thought of doing the same thing. My main concern is that I think that gogoanime is offloading all of their stuff on these third-party servers and with the number of issues that seem to be open that all are related to this issue. I think streamsb
may become the defacto server that is being used and if we have to xdg-open
for every video then there is really no point in using ani-cli.
@wh1ter4bb1t-js True, maybe we can scrape another site, but as we don't have control over it maybe will end up anyway.
Anyway, I like this complicated stuff, and one day I'm going to scrape a site that doesn't usually have many updates (e.g. Crunchyroll).
I encountered the same bug while trying to watch Cowboy Bebop. It looks like get_links
is returning an empty string because the function fails to scrap the video url. In fact, the video url is hidden inside an iframe, and even that only shows up after some javascript inserts the actual video element in the page (it isn't present in the HTML document itself).
Leaving this open, if someone wants to go wild on the regex stuff, feel invited
I found some workaround, though I am not entirely familiar on regex but it works on some anime
I added this line after line 262 and before the assignment of video_url
if [ "$episode_id" = "" ]; then
episode_id=$(echo "$embedded_video_url" | grep -oP "id.+?&")
fi;
video_url="https://gogoplay1.com/download?${episode_id}"
I made some investigation.
@chbo70
HI, so my main issue is about Black Clover (TV) episodes. After selecting the episode the Player wont start, however i tried it with different animes and they work just fine.
i tried replacing the select video quality print function in issue #192
but it seems its just this anime...
maybe someone can help me or tell me if they have the same issue thanks
I found that, other than vidstreamingcdn, a different mirror has been used to host Black Clover episodes: lb.loadfast1. The workaround is to replace line 265 with:
play_link=$(curl -s $video_url | grep -Eo "(http|https):\/\/(vidstreamingcdn.com|lb.loadfast1.com).*expiry=[0-9]*"| sort -u | sed 's/amp;//' | tail -n 1)
Of course, this is a temporary fix. It might be useful to enumerate all the different hosting URLs used by gogoanime.
@Duoslow
i have same issue at "senpai ga uzai kouhai no hanashi"
In this case the culprit lies on the current RegEx parsing to obtain the _episodeid string. What we want is to catch everything contained between the id= and &token substrings contained in the _embedded_videolink. To do so, replace line 262 and 263 with:
episode_id=$(echo "$embedded_video_url" | sed 's/.*id=\(.*\)&token.*/\1/')
video_url="https://gogoplay1.com/download?id={$episode_id}"
The solution proposed by @SaiCral will not work in platforms with grep non supporting Perl-compatible regular expressions (PCRE) (like OS X).
its not fixed by #232
On some episodes it works, like Serial Experiments Lain, but on others like Dr. Stone, it just prints: "\033[1;32m\nVideo played"
and then does nothing
edit: It prints the weird text even when it works
Yes, the PR doesn't fix it at least not in the current state. Like before, one piece works while flcl progressive doesn't
I made some investigation.
@chbo70
HI, so my main issue is about Black Clover (TV) episodes. After selecting the episode the Player wont start, however i tried it with different animes and they work just fine. i tried replacing the select video quality print function in issue #192 but it seems its just this anime... maybe someone can help me or tell me if they have the same issue thanks
I found that, other than vidstreamingcdn, a different mirror has been used to host Black Clover episodes: lb.loadfast1. The workaround is to replace line 265 with:
play_link=$(curl -s $video_url | grep -Eo "(http|https):\/\/(vidstreamingcdn.com|lb.loadfast1.com).*expiry=[0-9]*"| sort -u | sed 's/amp;//' | tail -n 1)
Of course, this is a temporary fix. It might be useful to enumerate all the different hosting URLs used by gogoanime.
@Duoslow
i have same issue at "senpai ga uzai kouhai no hanashi"
In this case the culprit lies on the current RegEx parsing to obtain the _episodeid string. What we want is to catch everything contained between the id= and &token substrings contained in the _embedded_videolink. To do so, replace line 262 and 263 with:
episode_id=$(echo "$embedded_video_url" | sed 's/.*id=\(.*\)&token.*/\1/')
video_url="https://gogoplay1.com/download?id={$episode_id}"
The solution proposed by @SaiCral will not work in platforms with grep non supporting Perl-compatible regular expressions (PCRE) (like OS X).
I'd rather not have the different urls enumerated. Instead, a -u url
option should be implemented as part of #228
Fix #232 works now. Confirmed with all anime mentioned in this thread. Will merge soon
HI, so my main issue is about Black Clover (TV) episodes. After selecting the episode the Player wont start, however i tried it with different animes and they work just fine.
i tried replacing the select video quality print function in issue #192
but it seems its just this anime...
maybe someone can help me or tell me if they have the same issue thanks