Code Monkey home page Code Monkey logo

audible-bookmark-extractor's Introduction

This tool allows a user to download their audiobooks from Audible and transcribes their bookmarks into text, which can be exported to Notion and Excel (.csv)

main_file.py contains the CLI and most of the application logic

To start

pip install -r requirements.txt

After everything is installed:

python main_file.py

Type help for a list of useful commands

Authentication

Run command

authenticate

Then when prompted enter your email and password, a separate window will open to display your CAPTCHA, which the program will prompt you for as well. NOTE: The CAPTCHAS for Audible seem to be pretty tough (as in not easily readable) lately, so you may need to retry a few times to get one you can solve.

Then you are logged into the Audible API and your credentials are stored in credentials.json, you won't need to authenticate again as long as you have this file.

On top of ffmpeg-python, you need FFMPEG installed on your computer, refer to python-ffmpeg github doc

https://github.com/kkroening/ffmpeg-python

Anti-Piracy Notice

Note that this project does NOT 'crack' Audible DRM or download audiobooks which the user does not own. It simply allows the user to use their own encryption key (fetched from Audible servers) to decrypt the audiobook in the same manner that the official audiobook playing software does, and download audiobooks which they have purchased.

Please only use this application for gaining full access to your own audiobooks for archiving/converson/convenience. DeDRMed audiobooks should not be uploaded to open servers, torrents, or other methods of mass distribution. No help will be given to people doing such things. Authors, retailers, and publishers all need to make a living, so that they can continue to produce audiobooks for us to hear, and enjoy. Don't be a parasite.

This message is paraphrased from the https://apprenticealf.wordpress.com/ page.

Also, the purpose of the software is not to circumvent the DRM restrictions for audio books that you do not own in that you do not have them on your personal Audible account. The purpose of this software is to create a method for you to download and store your books just in case Audible fails for some reason, as well as provide a way to export your bookmarks into an Excel file so that you may refer to your notes more easily, than having to rely on the Audible app.

FAQ:

sh: 1: ffmpeg: not found You need to install ffmpeg, refer to python-ffmpeg github doc https://github.com/kkroening/ffmpeg-python

audible-bookmark-extractor's People

Contributors

ggyll avatar hacdan avatar jeromedalbert avatar julianlagier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

audible-bookmark-extractor's Issues

Approval alert then amazon send me a code instead of email

Hi there,

Thanks for much for this tool. This can be a great help in me organizing my notes.
I'm facing an issue as this:

--- terminal record start ---

Enter Password (will be hidden, press ENTER when done): 
us, ca, uk, au, fr, de, jp, it, in, es

Please enter your locale from the list above: us
Answer for CAPTCHA: z3bztd
Approval alert detected! Amazon sends you a mail.
Please press ENTER when you approve the notification.

--- terminal record end ---

So instead of receiving an email to verify, I actually got a code via SMS. Please help.
*This is my first ever issue submitted on Github, please forgive me if I'm not doing it correctly.

Best,
Shuang

Authentication issues with captcha

Each captcha shows up with what seems like half the picture? (Example below). Are you aware of another way I can auth myself? Or know how to read these tiny captchas?

image

"Killed" error when getting bookmarks

Enter the index number of the book you would like to download, or enter --all for all available books:
15
Getting bookmarks for Impact Players
Killed

Dependencies installation fails for Python 3.11+

Installation with Python 3.11 fails because requirements.txt currently specifies numpy 1.22.4, which only works for Python 3.8-3.10.

I had to locally change my python version to 3.10.12 as a workaround to make it work.

Add user agent

Ensure requests are being sent with following header:

headers = {
    "User-Agent": "Audible/671 CFNetwork/1240.0.4 Darwin/20.6.0"
}

authenticate prompts for CVF Code: Not sure what that is

then get error
Traceback (most recent call last):
File "/home/agrohe/projects/audible-bookmark-extractor/main_file.py", line 626, in
loop.run_until_complete(audible_obj.main())
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/agrohe/projects/audible-bookmark-extractor/main_file.py", line 123, in main
await self.enter_command()
File "/home/agrohe/projects/audible-bookmark-extractor/main_file.py", line 146, in enter_command
await getattr(self, f"cmd_{command}", self.invalid_command_callback)(**_kwargs)
File "/home/agrohe/projects/audible-bookmark-extractor/main_file.py", line 85, in cmd_authenticate
auth = audible.Authenticator.from_login(
File "/home/agrohe/projects/audible-bookmark-extractor/env/lib/python3.10/site-packages/audible/auth.py", line 424, in

AttributeError: 'NoneType' object has no attribute 'get' while using get_bookmarks

reproduction steps:

authenticate
list_books
download_books
downloaded book with id 1 successfully (https://www.audible.co.uk/pd/The-Five-Dysfunctions-of-a-Team-Audiobook/B004EXKC5M)
convert_audiobook
converted book with id 1 successfully.
get_bookmarks

Traceback (most recent call last):
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 626, in <module>
    loop.run_until_complete(audible_obj.main())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 123, in main
    await self.enter_command()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 146, in enter_command
    await getattr(self, f"cmd_{command}", self.invalid_command_callback)(**_kwargs)
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 289, in cmd_help
    await self.main()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 123, in main
    await self.enter_command()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 146, in enter_command
    await getattr(self, f"cmd_{command}", self.invalid_command_callback)(**_kwargs)
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 461, in cmd_convert_audiobook
    await self.main()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 123, in main
    await self.enter_command()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 146, in enter_command
    await getattr(self, f"cmd_{command}", self.invalid_command_callback)(**_kwargs)
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 461, in cmd_convert_audiobook
    await self.main()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 123, in main
    await self.enter_command()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 146, in enter_command
    await getattr(self, f"cmd_{command}", self.invalid_command_callback)(**_kwargs)
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 289, in cmd_help
    await self.main()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 123, in main
    await self.enter_command()
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 146, in enter_command
    await getattr(self, f"cmd_{command}", self.invalid_command_callback)(**_kwargs)
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 375, in cmd_get_bookmarks
    print(self.get_bookmarks(book))
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/carlosrobles/Downloads/audible-bookmark-extractor-main/main_file.py", line 396, in get_bookmarks
    li_bookmarks = library.json().get("payload").get("records")
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.