Skip to content

Conversation

@kekincai
Copy link

Problem

  • Some EPUBs (e.g. TheEconomist.2026.01.10) store chapters as text/html, which ebooklib doesn’t classify as ITEM_DOCUMENT. The parser ends up with a spine containing only cover.xhtml/nav.xhtml, so TOC clicks always land on /read/.../0#.

Fix

  • Extend document detection in reader3.py to treat text/html and .html/.xhtml/.htm files as content documents.
  • This allows TOC entries to map to real chapters and produces a complete spine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant