NovelFire, WuxiaBox, LightNovelsTranslations providers added#411
NovelFire, WuxiaBox, LightNovelsTranslations providers added#411TJMolina wants to merge 4 commits intoLagradOst:masterfrom
Conversation
|
To be honest, |
|
|
||
| class LightNovelTranslationsProvider: MainAPI() { | ||
| override val name = "Light Novel Translations" | ||
| override val mainUrl = "https://lightnovelstranslations.com/" |
| } | ||
| } | ||
|
|
||
| //dont´t worry, is safe. This try to get page chapters |
There was a problem hiding this comment.
This is not really correct as the fetch order may be random, e.g. 51, 1, 241, 492. So having a single lastPageReached may produce invalid results if lastPageReached is randomly fetched first.
| private val baseHeaders = mapOf( | ||
| "user-agent" to "Mozilla/5.0" | ||
| "user-agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64)", | ||
| "User-Agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64)", |
There was a problem hiding this comment.
Having two "User-Agent" headers will not help.
|
|
||
| open val ajaxUrl = "ajax-chapter-option" | ||
|
|
||
| private val movilUserAgent = mapOf( |
What did I do in the commit minor problems fixed?In NovelFire I discovered that all the links follow the same format, so instead of making many requests I simply make 2 (one for the first chapters and another for the last ones). With this I can predict how many chapters there are in total and what the link of each one is. In LightNovelTranslationsProvider I corrected the mainUrl, and improved the pagination logic of the mainPage. In AllNovelProvider I modified the name of the variable that stores the mobile user-agent. It was called movilUserAGent because I didn’t know how to say “teléfono celular” in English. In ReadFromNetProvider I deleted one of the user-agents. The provider works perfectly. What did I do in minor visual bug fixed?Apparently in grid view, in the downloaded novels section, the reading progress could be seen but without any content inside. I fixed it so that it doesn’t appear (which is how it should be). |
I added 3 new providers based on the code from hamunoz’s QuickNovel version.
Link: https://github.com/hamunoz/QuickNovel
I added:
NovelFire
Light Novel Translations
WuxiaBox
They are only based on and not fully copied because hamunoz modified the provider logic, so I had to adapt it to QuickNovel. Besides those modifications, I also fixed errors.
For some reason, ReadFrom.Net had stopped working, but I’ve already solved it.
I also added some missing details to WTRLab.
Finally, I organized the APIs without deleting any, for visual convenience.