domenic / worm-scraper

Scrapes the web serial Worm, its sequel Ward, and the bridge series Glow-worm into an ebook format
Other
210 stars 48 forks source link

Generated epub not compatible with Play Books #22

Closed Es7evam closed 3 years ago

Es7evam commented 3 years ago

The generated epub is not compatible with Google Play Books.

An online epub validator (https://www.ebookit.com/tools/bp/Bo/eBookIt/epub-validator) points out possible errors. There are several on chapter 79, some on 211, 249 and 275.

Also it seems to have some problem on the cover and the img tag.

The only two fatal errors are on chapter 79, probably due some tag that was not closed properly:

FATAL(RSC-016): ./books/Bo/databases/eBookIt/temp_uploads/1609380837.epub/OEBPS/chapters/chapter079.xhtml(210,6): Fatal Error while parsing file: The element type "p" must be terminated by the matching end-tag "
".

ERROR(RSC-005): ./books/Bo/databases/eBookIt/temp_uploads/1609380837.epub/OEBPS/chapters/chapter079.xhtml(-1,-1): Error while parsing file: The element type "p" must be terminated by the matching end-tag "
". 
domenic commented 3 years ago

Thank you for finding this! Worm, not Ward, I take it? I'll look into it ASAP.

Es7evam commented 3 years ago

Yes, worm.

I tested Ward just in case and it's much better, albeit not compatible as well.

There's one fatal error in chapter 214, the other ones are the same warnings (e.g. the cover one, which might be good to take a look at since it's missing a "type" attribute at the style tag that some readers might autocomplete but others might not)

The fatal error:

FATAL(RSC-016): ./books/Bo/databases/eBookIt/temp_uploads/1609423750.epub/OEBPS/chapters/chapter214.xhtml(325,133): Fatal Error while parsing file: The element type "p" must be terminated by the matching end-tag "
domenic commented 3 years ago

OK, everything is passing the validator now! I'll see if I can get continuous integration running to prevent such problems in the future...

Es7evam commented 3 years ago

It's working perfectly now. Also tested on play books and both epubs are now now compatible with it.

Thanks for the quick fix!