[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ReadWN): Implemented better chapter assumption #622

Merged
merged 1 commit into from
May 8, 2023

Conversation

Rojikku
Copy link
@Rojikku Rojikku commented May 8, 2023

ReadWN Scraper Improvement

I noticed several old ReadWN related bug reports of chapters not loading that were hard to reproduce.
I found one I was able to reproduce.

I traced the issue down to the fact all the chapterUrls are actually generated procedurally in our script (1..2..3..), but sometimes authors use different naming schemes (001...002...003).

This is janky. So, to fix this, I made it more janky.

Based on my observations on ReadWN, the first hundred chapters comfortably display by default, In probably 90% of usecases, the issue will be ironed out by chapter 100. So I have as many chapters as it can generate according to the table of contents, and then resume procedural generation from where it left off until the latest chapter of the novel.

In the test case I had, this fixed the issue perfectly.
I tested some other random novels on the paired sources, and they did not appear to have any issues.
As an added benefit, this allows partial chapters to display on the earlier chapters (25.26 or 5.5)

I am not aware of any cons compared to the current implementation, but if we could do a full table of contents pull that would be even better.

Fixes LNReader/lnreader-plugins#448
Fixes LNReader/lnreader-plugins#480
Fixes LNReader/lnreader-plugins#479
Fixes LNReader/lnreader-plugins#464 specifically, but won't fix it if there's chapter numbers off the first page written like this

@rajarsheechatterjee rajarsheechatterjee merged commit 3a8135c into LNReader:main May 8, 2023
@Rojikku Rojikku deleted the ReadWN branch May 8, 2023 11:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants