TheNetsky / extensions-generic-0.8

Common CMS Extensions for Paperback 0.8
https://thenetsky.github.io/extensions-generic-0.8/
18 stars 25 forks source link

CoffeeManga chapters don’t load #48

Closed JRDSandstorm closed 8 months ago

JRDSandstorm commented 10 months ago

Describe the bug All CoffeeManga chapters return Paperback: JSError Error [PaperbackError(300)] JSError Error: Could not parse page for postID:#### chapterID:chapter-## - @ asyncFunctionResume@[native code] @[native code] promiseReactionJobWithoutPromise@[native code] promiseReactionJobWithoutPromise@[native code]:9015:32

To Reproduce Open any CoffeeManga chapter, doesn’t need to be added to library.

Expected behavior Should open and load chapter but it doesn’t.

Screenshots/Video If applicable, add screenshots to help explain your problem.

App version

Source WITH source version Madara Generic (0.8) - CoffeeManga 3.1.1

Additional context Tried purging and reinstalling source but issue still remains.

TheNetsky commented 10 months ago

Post on correct repo next time.

Ivanmatthew commented 8 months ago

Describe the bug All CoffeeManga chapters return Paperback: JSError Error [PaperbackError(300)] JSError Error: Could not parse page for postID:#### chapterID:chapter-## - @ asyncFunctionResume@[native code] @[native code] promiseReactionJobWithoutPromise@[native code] promiseReactionJobWithoutPromise@[native code]:9015:32

To Reproduce Open any CoffeeManga chapter, doesn’t need to be added to library.

Expected behavior Should open and load chapter but it doesn’t.

Screenshots/Video If applicable, add screenshots to help explain your problem.

App version

  • v0.8.6-r2

Source WITH source version Madara Generic (0.8) - CoffeeManga 3.1.1

Additional context Tried purging and reinstalling source but issue still remains.

This is fixed with PR #64 . The reason why this didn’t work before is due to CoffeeManga always adding the “data-src” attribute to anything but their first image. The problem is, is that they don’t use it and is just left empty. However since it is added in the element, it is a valid attribute and therefore will not be marked as undefined. The parser only checked if the attribute found was undefined or not, which meant that if you apply the logic to an empty “data-src” attribute, it would match and say the image url is an empty string. It also does not correct itself, because the conditional flow is written in an if-elseif-else way, meaning that it will match the first found attribute and skip the rest (E.g. check data-src first, then src, then data-cfsrc etc.)

TheNetsky commented 8 months ago

Indeed fixed in #64, thanks for the help!