HQAnime/AnimeGo-Re

Using the download url for streaming

Closed this issue ยท 13 comments

I was wondering if it is possible to use the same approach as in https://github.com/pystardust/ani-cli
? It uses the download links to play an episode instead of an embedded player.

Did I see that right that this app embeds the webplayer?

You are right. The app simply uses a webview. I always want to get the link directly but this needs to be done for each source. I can have a look and see how ani-cli does it.

After some diggings, I think it should be possible for the app as well using the same approach. However, a m3u8 player needs to be used instead.

Hmm, cool.
I'll have more time at Christmas.
As far as I know there are two options from here, use a solution like an Intent at least on Android, or smth like a flutter m3u8 player like this:
https://pub.dev/packages/yoyo_player
If I'll have time I will try out the flutter solution as that seems easier.

Did you self assign this cause u are doing it already?

I need to try it first. I got it working following ani-cli. The intent might be easy for Android. ๐Ÿ˜‰ I can assign it to you as well.

Hi, I have added a new branch to support this and I think the parsing is working now. It does take a few seconds to parse the link though. The problem now is how to play it. A header has to be passed in to stream it. This is the thing blocking us at the moment.

I just tried using flick-video-player which is built on top of video_player. The HTTP Header seems to be working and the video can be played now. If you have time, please have a try. However, it is not done yet and there might be side effects now. Opened #37 to track this.

This is now broken due to pystardust/ani-cli#217. We may need to find a new way to get the link.

hmmm, intresting. I was thinking of a more foolproof way to get it. And I was wondering if puppeteer could solve this issue.

But puppeteer does not work on mobile:

I do agree. The reason I didn't do this 2 years ago was because the website simply removed the link once I did it. It is not reliable. That's why I moved over to using the webview.

puppeteer should definitely work on Desktop but I don't want to use chrome if possible on desktop because I can wrap everything in electron using flutter web instead.

Also, check out pystardust/ani-cli#217 (comment) for another solution. encrpyt can be used for dart instead of CryptoJS.

@vkhobor I found another way of getting the URL. If the link is https://gogoplay1.com/embedplus?id=MTc3MjY4&token=e9_gXH7TtZQ9Jvhk-dgluw&expires=1640832473, we can simply go to https://gogoplay1.com/download?id=MTc3MjY4&token=e9_gXH7TtZQ9Jvhk-dgluw&expires=1640832473 to get links of MP4s. This is easier to do and won't require any HTTP headers. This method is from pystardust/ani-cli#209.

The new method works very well. I have forgotten the download page completely. The download button can be added back as well. This should also work on Desktop by opening the default browser or a media player. However, the UI is not ready yet.

Unfortunately, the new approach is no longer working. Currently, there are just too many people parsing the website using scripts. I may try the decrypt method and that's it ๐Ÿ‘

I will close this for now as I went with a different approach in #49. It is still working after 9 months of the implementation, and it only needs a few lines of JavaScript.