aerkalov/ebooklib

How to save the cover image?

advancejar opened this issue · 3 comments

epubBook = epub.read_epub('.\3.epub')
imgdir = epubBook.get_metadata('OPF', 'cover')[0][1]["content"]
img = epubBook.get_item_with_id(imgdir)

then,How can I save it to disk?

Maybe you can use get_content() to save it.

@advancejar, 11 months later, did you come up with a solution?
Follow-up questions:

  • Are you getting any error messages?
  • What operating system are you using (Win 10, Win 11, Linux, Mac, etc.)?
  • What version of Python are you using?
  • What version/build of ebooklib are you using?