athrowaway2021 / comix

Seamlessly download and de-drm comics and manga from Kindle in highest possible quality
MIT License
61 stars 20 forks source link

Title not decrypting. #62

Open dilliboy opened 2 weeks ago

dilliboy commented 2 weeks ago

I can't make a lot of sense out of this. Not sure why it won't work.

C:\comix>python unkindle.py B08CY8TGDP Authenticating . . . Logged in with saved state Authenticated! Download size: 88MB Downloading the book . . . 93% Extracting . . . ERROR:root:Unknown com.amazon.yjconversion feature: yj_publisher_panels-3 Traceback (most recent call last): File "C:\comix\unkindle.py", line 188, in kindle.download(args.output, args.keep_temp) File "C:\comix\unkindle.py", line 138, in download metadata = self.book.get_metadata() ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\comix\third_party\kfxlib\yj_book.py", line 156, in get_metadata if self.has_metadata() and self.has_cover_data(): ^^^^^^^^^^^^^^^^^^^ File "C:\comix\third_party\kfxlib\yj_metadata.py", line 246, in has_metadata self.fragments.get(YJFragmentKey(ftype="$258")) is not None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\comix\third_party\kfxlib\yj_container.py", line 322, in get raise KeyError("YJFragmentList get has multiple matches for %s: %s" % (repr(key), list_symbols(matches))) KeyError: 'YJFragmentList get has multiple matches for $258::: $258::, $258::'

2023comicjtr commented 2 days ago

I've had this happen with almost every new title for the last month or so, but it has occasionally happened with older titles (the one you used as an example was from about four years ago). I don't know if there is any better way of doing this (probably), but this is the process that's worked for me:

The first step is to download the comic just the way you did, and then import it into Calibre (drag one of the .kfx files into Calibre's main window), making sure you've installed the KFX Input plugin from here: https://www.mobileread.com/forums/showthread.php?t=291290.

Next, find your Calibre library folder and then dig down in the library folder for the author of the comic and then finally the folder for the comic you just downloaded, then open up a terminal in that location.

If you look at the KFX Input page, there are instructions given for the Command Line Interface. We'll need those, but basically it boils down to this:

calibre-debug -r "KFX Input" -- --cbz infile [outfile]

That, at least, is the command I use (there are other options on the KFX Input plugin page). Also, note that depending if you're using Windows or Mac or Linux the command will change slightly. As an example, this would be my command in Windows:

calibre-debug.exe -r "KFX Input" -- --cbz '.\Original File Name.kfx' '.\Converted File Name.cbz'

If the comic is a single issue or a small collection, this process should be fairly quick; if it a large collection or an omnibus, it will take quite a bit longer. The resulting cbz file will be in the same file as the original.

I then unzip the cbz file and convert the png files inside to jpg files, rename them, then zip the folder back to cbz.

As I said, there may be a better (simpler) procedure with fewer steps, but this has always worked for me.