Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title not decrypting. #62

Open
dilliboy opened this issue Sep 29, 2024 · 3 comments
Open

Title not decrypting. #62

dilliboy opened this issue Sep 29, 2024 · 3 comments

Comments

@dilliboy
Copy link

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
Copy link

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.

@dilliboy
Copy link
Author

I hadn't responded yet but I've been using this workaround heaps @2023comicjtr . I really appreciate it.

The --unpack feature has been especially useful for identifying titles that are better to remain as untouched pdf's (especially with titles that have been grossly compressed already).

Super helpful, thanks again!

@2023comicjtr
Copy link

Not a problem!

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

No branches or pull requests

2 participants