zzZ5 / Html2Epub

将 html链接, html文件 或 html文本 转换成 epub文件.
MIT License
23 stars 5 forks source link

生成的epub中没有内容 #1

Closed MerrickZ closed 4 years ago

MerrickZ commented 4 years ago

使用html文件方式添加chapter以后 生成的epub文件目录正常, 但是内容都是<p></p> 一点文字都没有

zzZ5 commented 4 years ago

最近比较忙,具体是哪个网页,有空我看看

MerrickZ commented 4 years ago

我已经搞定了 问题是这样的,如果有以下形式的html:

<body>
这里是内容
<p></p>
这里有内容
</body>

也就是说,在body标签里的文本内容存在的话,或者这些文本在<pre>标签里的时候,就会丢失。 应该是clean的过程中出的问题,没有对这类文本进行识别。

目前我的解决办法是 手动给文本加

zzZ5 commented 4 years ago

kindle中所支持的tag clean是按照这个标准来识别的,若是需要支持<pre>等标签,可以在 constants.py 里 SUPPORTED_TAGS字典中添加需要识别的标签名。

MerrickZ commented 4 years ago

嗯,这个网页没有标签。。看来要加body标签了

baoju notifications@github.com 于 2019年9月10日周二 下午12:02写道:

Closed #1 https://github.com/zzZ5/Html2Epub/issues/1.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zzZ5/Html2Epub/issues/1?email_source=notifications&email_token=AAHZLFASS4HT3747QJJRAXTQI4L65A5CNFSM4IUEPNLKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTQ3IZAA#event-2620820608, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHZLFHFXVUMF6KNKATNUQDQI4L65ANCNFSM4IUEPNLA .