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

Skips 10 out of 68 audiobooks #26

Closed
ErgoPraxis opened this issue Dec 11, 2023 · 6 comments
Closed

Skips 10 out of 68 audiobooks #26

ErgoPraxis opened this issue Dec 11, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@ErgoPraxis
Copy link

Let me know how I can provide better context and I will retroactively edit this issue.

program either hangs or spits out this error.

error decrypting https://www.audible.com/library/download?asin=B003WVNWU4&codec=AAX_44_128: exit status 1

I've tried rerunning the program again and again; randomly it will download an additional book.

@jvatic jvatic added the bug Something isn't working label Dec 14, 2023
@jvatic
Copy link
Owner

jvatic commented Dec 14, 2023

Thanks for the bug report! :)

Can you try with the latest release (I think it's still a bit buggy, but should be more stable and handles identifying downloaded books a bit better).

And if that's still giving you issues, can you try with the LOG_LEVEL=debug environment variable set (or LOG_LEVEL=trace if there's an issue logging in)? This should output more useful errors.

Of note: If you have books in your library that have been downloaded as part of your subscription and not purchased (i.e. books without the option to download them in the web UI), then these will download the info.txt file and nothing else.

@ErgoPraxis
Copy link
Author

Sweet. Will do!

To note, I had compiled directly from source in a virtual container, so it should be the latest code you have.

My current theory is the multi-part books are causing issue. For some reason, Audible breaks longer books (a single book) into multi-part downloads.

All my books should be purchased, non-subscription related, so that shouldn't be the issue.

I will follow your instructions later this week and post the results.

Also, do you have a place for donations? I can't donate much, but this code has saved me from re-buying most my books (hopefully all soon) in my journey to de-Amazon my life.

@jvatic
Copy link
Owner

jvatic commented Dec 15, 2023

Great! The main changes I made the other day were updating dependencies and there were a few html selectors for the auth flow that were out of date.

With multi-part books Audible usually has a download option for each part plus the full download, and the current handling of that is too simplistic—all downloads where the output path contains the string "Part" are excluded (so if for example, the book title contains "Particle", and the output path template contains the book title, it won't be downloaded). Could that be a common thread with the books that are being skipped? I've pushed up a change that handles this better.

I'm glad this has helped you! I don't currently have anything setup for receiving donations, might I suggest donating to a social cause instead?

@ErgoPraxis
Copy link
Author

ErgoPraxis commented Dec 16, 2023

EDIT:

Ooop, I wasn't using the latest code. Sorry. I'm still learning containerization. There was some caching and tagging issues ... I'm investigating the latest code now.

I'm gonna leave my original comment below and strike it out.... it was beautifully summarized with lots of love and labor ... for old code. I'm so sad.

END EDIT

When running `LOG_LEVEL=debug`, I get 1 decrypt error and 37 skips. (See end of comment for attached files)

Out of the 37 skips, 3 of them appear to be what you mentioned before, where the book title contains Part; these are the Galaxy Edge books (see below).

The remainder of the failed books I'm uncertain. I have theories and observations

  1. The theory, is the books are too long for single download, so Audible doesn't offer a single download (Do you have an idea on how to confirm/deny this theory?)

  2. The observation is that 08) Dawn tries to re-download every time I run the program even though it has an existing mp4 file in the directory. The decrypt error happens immediately after the Dawn book downloads. See the details below, but note how the asin doesn't belong to Dawn? I'm not sure if the decrypt error and the continual re-attempt to download Dawn between runs is related. Could the program have a mismatch of some kind where it's attempting to use the Eldest book asin with the Dawn book file or visa-versa?

  3. Maybe there's 3 separate things going on: part present in title causes skipping, dawn failure unknown reason, and decrypt error of eldest.

The decryption error:

error decrypting https://www.audible.com/library/download?asin=B003WVNWU4&codec=AAX_44_128: exit status 1

Note the asin is B003WVNWU4 which belongs to 09) Eldest [...] when looking into the info.txt file.

The remainder of this comment is cleaned up data from the program, hopefully to give context of it's state. Let me know if you have other ideas I can run through.

TUI: The 9 Books which fail to download as listed from the cli,

Download 9 new books from your Audible library? (yes/no/list): list
01) Rhythm of War: Book Four of The Stormlight Archive by 
02) Galaxy's Edge, Part IV by 
03) Galaxy's Edge, Part III by 
04) Galaxy's Edge, Part II by 
05) Galaxy Outlaws: The Complete Black Ocean Mobius Missions, 1-16.5 by 
06) Sherlock Holmes by 
07) Oathbringer by 
08) Dawn: Xenogenesis, Book 1 by 
09) Eldest: The Inheritance Cycle, Book 2 by 

Info.txt files

For reference, all 67 books (successful and failed) info.txt url's as printed from the command $ for f in ./*/*.txt ; do (cat "${f}"; echo) | egrep '^URL'; done

NOTE: I added an asterisk to the 9 failed books in the below text.

 URL: https://audible.com/pd/B00I3JW2SS
 URL: https://www.audible.com/pd/Age-of-Myth-Audiobook/B0161R0XBQ
 URL: https://www.audible.com/pd/All-These-Worlds-Audiobook/B07341FZDC
 URL: https://www.audible.com/pd/Black-Ops-Audiobook/B075NMRZTR
 URL: https://www.audible.com/pd/Brisingr-Audiobook/B002V0A444
 URL: https://www.audible.com/pd/Children-of-Ruin-Audiobook/1549119788
 URL: https://www.audible.com/pd/Children-of-Time-Audiobook/B071Y9TTHC
 URL: https://www.audible.com/pd/Columbus-Day-Audiobook/B01N48VJFJ
 URL: https://www.audible.com/pd/Cytonic-Audiobook/B09BS3V92Z
*URL: https://audible.com/pd/B00HZOLXWI
 URL: https://www.audible.com/pd/Death-World-Audiobook/B00YT8AV8A
 URL: https://www.audible.com/pd/Dust-World-Audiobook/B00JEKVZKQ
*URL: https://www.audible.com/pd/Eldest-Audiobook/B003WVNWU4
 URL: https://www.audible.com/pd/Empire-Earth-A-Space-Opera-Boxed-Set-Audiobook/B089DKM5CD
 URL: https://www.audible.com/pd/Empire-in-Black-and-Gold-Audiobook/1529050278
 URL: https://www.audible.com/pd/Enders-Game-Audiobook/B002V5A12Y
 URL: https://www.audible.com/pd/Eragon-Audiobook/B002UZKL7A
 URL: https://www.audible.com/pd/For-We-Are-Many-Audiobook/B01N17THEO
*URL: https://www.audible.com/pd/Galaxy-Outlaws-The-Complete-Black-Ocean-Mobius-Missions-1-165-Audiobook/B079YYJK47
 URL: https://www.audible.com/pd/Galaxys-Edge-Audiobook/B079LRSMNN
*URL: https://www.audible.com/pd/Galaxys-Edge-Part-III-Audiobook/B07FSVCJ5J
*URL: https://www.audible.com/pd/Galaxys-Edge-Part-II-Audiobook/B07D3C3GJT
*URL: https://www.audible.com/pd/Galaxys-Edge-Part-IV-Audiobook/1772308269
 URL: https://www.audible.com/pd/Harry-Potter-and-the-Sorcerers-Stone-Book-1-Audiobook/B017V4IM1G
 URL: https://www.audible.com/pd/Heavens-River-Audiobook/B088C4DBYP
 URL: https://www.audible.com/pd/He-Who-Fights-with-Monsters-2-Audiobook/1774249162
 URL: https://www.audible.com/pd/He-Who-Fights-with-Monsters-3-Audiobook/1039400205
 URL: https://www.audible.com/pd/He-Who-Fights-with-Monsters-4-Audiobook/B09GHD1R2R
 URL: https://www.audible.com/pd/He-Who-Fights-with-Monsters-5-Audiobook/B09PSSTFP3
 URL: https://www.audible.com/pd/He-Who-Fights-with-Monsters-6-Audiobook/B09WB2V33H
 URL: https://www.audible.com/pd/He-Who-Fights-with-Monsters-A-LitRPG-Adventure-Audiobook/1774248182
 URL: https://www.audible.com/pd/Home-World-Audiobook/B01E9FHNEM
 URL: https://audible.com/pd/B00I5YAIBE
 URL: https://www.audible.com/pd/Inheritance-Audiobook/B005ZWA2P6
 URL: https://www.audible.com/pd/Machinehood-Audiobook/1797128647
 URL: https://www.audible.com/pd/Machine-World-Audiobook/B00U2S776K
 URL: https://www.audible.com/pd/Mr-Frosty-Pants-A-Gay-Christmas-Romance-Audiobook/B08179NVZ6
*URL: https://www.audible.com/pd/Oathbringer-Audiobook/B0718Z5K4C
 URL: https://www.audible.com/pd/One-Realm-Beyond-Audiobook/B00IFHW6SO
 URL: https://www.audible.com/pd/Paradise-Audiobook/B071438NCM
 URL: https://www.audible.com/pd/Redwall-Audiobook/B002UZDS2K
*URL: https://www.audible.com/pd/Rhythm-of-War-Audiobook/1250759781
 URL: https://www.audible.com/pd/Rogue-World-Audiobook/B071WWW2DD
*URL: https://www.audible.com/pd/Sherlock-Holmes-Audiobook/B06WLMWF2S
 URL: https://www.audible.com/pd/Sissy-Audiobook/B07M8P28DN
 URL: https://www.audible.com/pd/Skyward-Audiobook/B07H7Q5D3M
 URL: https://www.audible.com/pd/SpecOps-Audiobook/B06W5861HP
 URL: https://www.audible.com/pd/Starsight-Audiobook/B07VYMVXK6
 URL: https://www.audible.com/pd/Steel-World-Audiobook/B00GBC0GB4
 URL: https://www.audible.com/pd/Tech-World-Audiobook/B00NVOJYYU
 URL: https://www.audible.com/pd/The-Alloy-of-Law-Audiobook/B005ZUI3OA
 URL: https://www.audible.com/pd/The-Dragonet-Prophecy-Audiobook/B00846MM62
 URL: https://www.audible.com/pd/The-Eye-of-the-World-Audiobook/B0036NHZ10
 URL: https://www.audible.com/pd/The-Final-Empire-Audiobook/B002V0QCYU
 URL: https://www.audible.com/pd/Theft-of-Swords-Audiobook/B007KSJKI8
 URL: https://www.audible.com/pd/The-Hero-of-Ages-Audiobook/B002VA9IKK
 URL: https://www.audible.com/pd/The-Hidden-Kingdom-Audiobook/B01HS93H2I
 URL: https://www.audible.com/pd/The-Lost-Heir-Audiobook/B01BFPVOV2
 URL: https://www.audible.com/pd/The-Praxis-Audiobook/B097HW8VY7
 URL: https://www.audible.com/pd/The-Singularity-Trap-Audiobook/B07BHVWFSM
 URL: https://www.audible.com/pd/The-Way-of-Kings-Audiobook/B003ZWFO7E
 URL: https://www.audible.com/pd/The-Well-of-Ascension-Audiobook/B002V5GLQ4
 URL: https://www.audible.com/pd/Thrawn-Star-Wars-Audiobook/B01MTYYPKY
 URL: https://www.audible.com/pd/We-Are-Legion-We-Are-Bob-Audiobook/B01L082HJ2
 URL: https://www.audible.com/pd/Words-of-Radiance-Audiobook/B00HWF0MHW
 URL: https://audible.com/pd/B002V8N37Q
 URL: https://www.audible.com/pd/Zero-Hour-Audiobook/B078RV7BWR

STD Error Output

See attached for both the std out and std error captured from the program. Also, see just here for a cleaned up version of which ones were skipped by running this filter. It clearly shows all multi parts are being correctly skipped except the 3 Galaxy Edges books, which appear to contain the single file url download.

# grep -Po 'Skipping.*?aax' stderr.log | sort

Skipping /data/Dawn/DawnPart1XenogenesisBook1_ep6.aax
Skipping /data/Dawn/DawnPart2XenogenesisBook1_ep6.aax
Skipping /data/Eldest/EldestPart1TheInheritanceCycleBook2_ep7.aax
Skipping /data/Eldest/EldestPart2TheInheritanceCycleBook2_ep7.aax
Skipping /data/Eldest/EldestPart3TheInheritanceCycleBook2_ep7.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part1_ep6.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part2_ep6.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part3_ep6.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part4_ep6.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part5_ep6.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part6_ep6.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part7_ep6.aax
Skipping /data/Galaxy Outlaws/GalaxyOutlawsTheCompleteBlackOceanMobiusMissions1-16.5Part8_ep6.aax
Skipping /data/Galaxy's Edge, Part II/GalaxysEdgePartIIPart1_ep6.aax
Skipping /data/Galaxy's Edge, Part II/GalaxysEdgePartIIPart2_ep6.aax
Skipping /data/Galaxy's Edge, Part II/GalaxysEdgePartII_ep6.aax
Skipping /data/Galaxy's Edge, Part III/GalaxysEdgePartIIIPart1_ep6.aax
Skipping /data/Galaxy's Edge, Part III/GalaxysEdgePartIIIPart2_ep6.aax
Skipping /data/Galaxy's Edge, Part III/GalaxysEdgePartIII_ep6.aax
Skipping /data/Galaxy's Edge, Part IV/GalaxysEdgePartIVPart1_ep6.aax
Skipping /data/Galaxy's Edge, Part IV/GalaxysEdgePartIVPart2_ep6.aax
Skipping /data/Galaxy's Edge, Part IV/GalaxysEdgePartIV_ep6.aax
Skipping /data/Oathbringer/OathbringerPart1_ep6.aax
Skipping /data/Oathbringer/OathbringerPart2_ep6.aax
Skipping /data/Oathbringer/OathbringerPart3_ep6.aax
Skipping /data/Oathbringer/OathbringerPart4_ep6.aax
Skipping /data/Oathbringer/OathbringerPart5_ep6.aax
Skipping /data/Rhythm of War/RhythmofWarPart1BookFourofTheStormlightArchive_ep6.aax
Skipping /data/Rhythm of War/RhythmofWarPart2BookFourofTheStormlightArchive_ep6.aax
Skipping /data/Rhythm of War/RhythmofWarPart3BookFourofTheStormlightArchive_ep6.aax
Skipping /data/Rhythm of War/RhythmofWarPart4BookFourofTheStormlightArchive_ep6.aax
Skipping /data/Rhythm of War/RhythmofWarPart5BookFourofTheStormlightArchive_ep6.aax
Skipping /data/Sherlock Holmes/SherlockHolmesPart1_ep6.aax
Skipping /data/Sherlock Holmes/SherlockHolmesPart2_ep6.aax
Skipping /data/Sherlock Holmes/SherlockHolmesPart3_ep6.aax
Skipping /data/Sherlock Holmes/SherlockHolmesPart4_ep6.aax
Skipping /data/Sherlock Holmes/SherlockHolmesPart6_ep6.aax

stderr.log
stdout.log

Donations

:) Each month I try to donate x amount broken down and given to different teams/creators/social-causes. or, at least, that's the habit I'm trying to form. Anything that is FOSS and I use or think will benefit society as a whole or myself.

@ErgoPraxis
Copy link
Author

ErgoPraxis commented Dec 17, 2023

Success!!!

Latest code works flawlessly.

  • It correctly downloads the large audiobooks without a full download option into their parts.
  • It correctly downloads the titles, full link when the word Part is present.

Thank you so much!

Join multiple mp4

Side note if anyone else reads this and is on a similar pursuit.

To join the parts back into a full single file, I use the following command ran inside the books root directory.

for f in `ls *.mp4 | sort`; do echo file \'"${f}"\'; done | tee file_list.txt

This creates the file list to be concatenated using ffmpeg

ffmpeg -f concat -i file_list.txt -c copy RhythmofWarBookFourofTheStormlightArchive.mp4

Be sure to give the output mp4 the name of the book.

@jvatic
Copy link
Owner

jvatic commented Dec 19, 2023

Success!!!

Latest code works flawlessly.

It correctly downloads the large audiobooks without a full download option into their parts.
It correctly downloads the titles, full link when the word Part is present.
Thank you so much!

Yay, I'm glad that fixed the issue!

Ooop, I wasn't using the latest code. Sorry. I'm still learning containerization. There was some caching and tagging issues ... I'm investigating the latest code now.

I'm gonna leave my original comment below and strike it out.... it was beautifully summarized with lots of love and labor ... for old code. I'm so sad.

And thank you for your detailed comment above, even if it was using old code!

Join multiple mp4

Please feel free to open an issue for adding support for concatenating multi-part books that don't have a "Full" download, that shouldn't be too difficult to implement and is definitely a feature worth having!

:) Each month I try to donate x amount broken down and given to different teams/creators/social-causes. or, at least, that's the habit I'm trying to form. Anything that is FOSS and I use or think will benefit society as a whole or myself.

Wonderful, I think that's an excellent habit to aspire to! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants