Page MenuHomePhorge

Download and de-DRM any dangling Kindle books
Closed, ResolvedPublic

Event Timeline

keithzg triaged this task as Unbreak Now! priority.

Okay so to download my Kindle books I could use https://github.com/treetrum/amazon-kindle-bulk-downloader, that in turn requires using bun which . . . appears to be yet another NodeJS package manager? Fantastic, that'll definitely work, it won't immediately fail like every other time I've touched the NodeJS ecosystem.

keithzg@district:~/Code/git/amazon-kindle-bulk-downloader$ bun install
bun install v1.2.3 (8c4d3ff8)
  📦 Installing [242/255] internal/modules/cjs/loader.js:819
  throw new ERR_REQUIRE_ESM(filename);
  ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/keithzg/Code/git/amazon-kindle-bulk-downloader/node_modules/puppeteer/install.mjs
    at Object.Module._extensions..mjs (internal/modules/cjs/loader.js:819:9)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11

error: postinstall script from "puppeteer" exited with 1
keithzg changed the visibility from "All Users" to "Public (No Login Required)".Sun, Feb 23, 5:41 PM

Mysteriously, a subsequent bun install seems to have worked? Or maybe it just died in a way where it doesn't realize it needs to try again, because

keithzg@district:~/Code/git/amazon-kindle-bulk-downloader$ bun puppeteer browsers install chrome
/home/keithzg/Code/git/amazon-kindle-bulk-downloader/node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js:26
            buildId: puppeteer_js_1.default.configuration.chrome?.version ||
                                                                 ^

SyntaxError: Unexpected token .
    at Module._compile (internal/modules/cjs/loader.js:718:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11
error: "puppeteer" exited with code 1

Yeah I think that's it, in standard "JavaScript devs reinvent wheel but badly" it doesn't seem to try to do the postinstall step and so it doesn't show that the same problem is happening.

https://github.com/treetrum/amazon-kindle-bulk-downloader/issues/145 appears to be my same issue. Unfortunately the only reported solution there was to try Arch Linux.

I absolutely just gave up on the bulk downloads and just manually downloaded each of the mere 14 titles I "own" on Amazon's Kindle platform.

Funny enough, I didn't really need https://github.com/noDRM/DeDRM_tools in the end, I mean I did have a few titles that were DRM'd but the ones that were a bit obscure and so I reckoned it might be hard to find again were all free of DRM already! It was the ones I got super cheap or free that were bigger titles that I could have easily found a pirated copy of that were DRM'd.