dteviot / WebToEpub

A simple Chrome (and Firefox) Extension that converts Web Novels (and other web pages) into an EPUB.
Other
740 stars 140 forks source link

Error when download a novel on Ranobes.net #641

Closed Flwk closed 3 years ago

Flwk commented 3 years ago

Hello

I have an error when I try to get this novel on ranobes.

Here is the error :

Warning, unable to convert chapter 'Chapter 200: I Boned Her' from 'https://ranobes.net/up/confinement-king/1168016-1.html' to valid XHTML. Your epub viewer may fail when viewing that chapter. You may need to fix the chapter manually with Calibre. 
Conversion error message was: (This page contains the following errors:error on line 2 at column 4905: error parsing attribute name
Below is a rendering of the page up to the first error.)

Warning, unable to convert chapter 'Chapter 202: Right place, Right time' from 'https://ranobes.net/up/confinement-king/1168018-1.html' to valid XHTML. Your epub viewer may fail when viewing that chapter. You may need to fix the chapter manually with Calibre. 
Conversion error message was: (This page contains the following errors:error on line 2 at column 1344: error parsing attribute name
Below is a rendering of the page up to the first error.)

Warning, unable to convert chapter 'Chapter 212: Cold Eyes' from 'https://ranobes.net/up/confinement-king/1168028-1.html' to valid XHTML. Your epub viewer may fail when viewing that chapter. You may need to fix the chapter manually with Calibre. 
Conversion error message was: (This page contains the following errors:error on line 2 at column 6581: error parsing attribute name
Below is a rendering of the page up to the first error.)

Warning, unable to convert chapter 'Chapter 226: They're Good Friends After All' from 'https://ranobes.net/up/confinement-king/1168053-1.html' to valid XHTML. Your epub viewer may fail when viewing that chapter. You may need to fix the chapter manually with Calibre. 
Conversion error message was: (This page contains the following errors:error on line 2 at column 5507: error parsing attribute name
Below is a rendering of the page up to the first error.)

it's the first time i had this error. I opened the epub on Calibre, and it looks like i have no problem, but i thought that it's better to signal it.

Thank you very much for all your work ! :)

dteviot commented 3 years ago

@Flwk It's not a problem with WebToEpub, there's a problem with the web page itself. Looking at the HTML, the page is:

<p> On the other hand, the <forged(fake) memory(memory)> seems to be useful if used well. For example, I could implant a memory to a girl that she will ask me to have sex with her.</forged(fake)></p>

However, when you view this text in a browser, what you see is:

On the other hand, the seems to be useful if used well. For example, I could implant a memory to a girl that she will ask me to have sex with her.

Note the text <forged(fake) memory(memory)> is missing. I think what happened is the text was supposed to have < and > characters, but because they are special, they were not escaped. So they became HTML that's not valid as XHTML.

Note, Calibre is able to view the page, because it's not fussy about invalid XHTML. other epub readers are not as forgiving.

You should probably tell the site admins about the faulty page, so they can fix it. The other pages are probably similar.