keiyoushi / extensions-source

Source code of extensions for Tachiyomi/Mihon and variants.
https://keiyoushi.github.io/
Apache License 2.0
1.94k stars 437 forks source link

Hentailib parser not working after redesign #2998

Closed GregerForever closed 3 months ago

GregerForever commented 4 months ago

Source information

HentaiLib 1.4.44

Source language

Russian

Steps to reproduce

I just open the extension

Expected behavior

when you open it, it should open a list of titles.

Actual behavior

It throws a NullPointerException error

Mihon/Tachiyomi version

0.16.4

Android version

Android 14

Other details

Since HentaiLib has undergone a redesign, the parser needs to be updated for the new version. YaoiLib will also get a new design next week (news source). You can also take care of this issue in parallel: #2660

Acknowledgements

GregerForever commented 4 months ago

@Karutovn I don’t quite understand you, if you are talking about the tag, then it is set correctly, because the site is not dead and is not closing, it just changed the design and now it is not compatible with the parser. If you mean something else, please write in more detail.

nedius commented 4 months ago

The whole hentailib extension is not working. And as i checked, source of extension, new site version and old version from wayback machine, there is no more script with window.__DATA__ from where extension was getting information.. With new version of site, information now comes from api calls to https://api.lib.social that is protected by Bearer token authorization. I can confirm that mangalib site can grab data from api.lib.social too but without bearer token (maybe for now). I assume that all 3 extension (mangalib, hentailib, yaoilib) will undergo the same redesign of ui and internal working, so window.__DATA__ will not work anymore.

GregerForever commented 4 months ago

@nedius Yes, all 3 extensions will undergo the same redesign ui and inner workings. I've read about the Bearer token, and I have concerns about the potential impossibility of the extension continuing to work due to the Bearer token. In this case, how valid are these concerns?

nedius commented 4 months ago

@GregerForever I think it is still possible. As i understand mihon uses headless browser so i think it still should be possible to intercept api calls, as you do can do manually in chrome console. Besides some of information extension reads from page itself, and old selectors not working anymore on new version. So i think we just need to update parser. I am interested in libgroup extensions as i use it myself, so will try to understand how to set up development environment and see what i can do. I can say that i did try android programing, but on the surface.

nedius commented 4 months ago

Digging through obfuscated code, I found that authentification are done when logging in, and are saved to localstorage auth field with all the necessary information to update it too. So if there is way to grab localstorage from web view it would be easy. And then just call api itself without parsing site itself. Because new design is SPA so data is lazy loaded. Making it impossible to parse html itself, because now its dynamic.