KotatsuApp / kotatsu-parsers

Manga parsers library for Kotlin/JVM and Android
https://kotatsu.app/dev/parsers-library/
GNU General Public License v3.0
145 stars 39 forks source link

MangaFire blocking solution found #875

Open Mhuzaifakhalid opened 4 months ago

Mhuzaifakhalid commented 4 months ago

Source information

MangaFire

Steps to reproduce

I started using MangaFire a month ago or so. But after a few days, the source blocked me whenever I downloaded something. I really really love it and so do many other users. I've seen the same complaint in the discord discussion as well. I've attached the Screenshot of the error as well.

But today I observed that whenever I'm blocked and I open any manga from that source in webmode, it does some verification saying "WAF" and the website works in the webmode even when not working in the app.

But here's the thing, when the website is loaded in the webmode, it starts working in the app as well. If it stops working again, opening it in the webmode solves it for some time. So I thought maybe the devs could use this info and do something about it as MangaFire is THE BEST source for me and many many other users.

Thanks (sorry for the bad English) Screenshot_20240627_211140_Kotatsu

Kotatsu version

7.2.1

Android version

Android 14

Other details

No response

Acknowledgements

Mhuzaifakhalid commented 4 months ago

So I tried to debug the website (mangafire.to) myself like some days ago, and noticed that this website has some javascript auto-redirecting to the homepage.

You can reproduce it by opening the web in a laptop/desktop browser, and open Inspect Elements. Try to go to other page (i.e. https://mangafire.to/type/manga) with the Inspect Elements still open, and you'll be redirected to https://mangafire.to/ again.

This can also be triggered if you're using AdBlocker, in my case I use Adblock Plus extension for Chrome.

I guess this could give another clue why Kotatsu failed to parse the html properly. The error message shows that Kotatsu couldn't find ".info > h1" which I believe are some HTML classes.

I'd say this issue is more like a parser issue, but the devs will need to investigate it themselves.

The most guaranteed way to handle this kind of auto-redirecting issue, is to remove the javascript used to redirect users. Without fully dealing with the annoying javascript, Kotatsu parser will probably just get redirected again.