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

Unable to download from libby #81

Open
thejoester opened this issue Oct 30, 2024 · 38 comments
Open

Unable to download from libby #81

thejoester opened this issue Oct 30, 2024 · 38 comments

Comments

@thejoester
Copy link

Describe the problem
My libraries now have a notice that downloading the MP3 (.odm file) will no longer be available after Nov 11 2024, so I am trying to download a book using the libby command I get errors:

C:\Users\joe>odmpy libby -d "c:\Users\joe\Downloads\Libby" --latest 1
odmpy Interactive Client for Libby
----------------------------------------------------------------------
An unexpected error has occurred
Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 1099, in _validate_conn
    conn.connect()
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connection.py", line 653, in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connection.py", line 806, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\util\ssl_.py", line 465, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\util\ssl_.py", line 509, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\ssl.py", line 1041, in _create
    self.do_handshake()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\ssl.py", line 1319, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 793, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 491, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 877, in urlopen
    return self.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 847, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\util\retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sentry-read.svc.overdrive.com', port=443): Max retries exceeded with url: /chip/sync (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\libby.py", line 350, in make_request
    res = session.send(
          ^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='sentry-read.svc.overdrive.com', port=443): Max retries exceeded with url: /chip/sync (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)")))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\odm.py", line 846, in run
    synced_state = libby_client.sync()
                   ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\libby.py", line 457, in sync
    res: Dict = self.make_request("chip/sync")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\libby.py", line 362, in make_request
    raise ClientConnectionError(str(conn_err)) from conn_err
odmpy.libby_errors.ClientConnectionError: <odmpy.libby_errors.ClientConnectionError; http_status=0, msg='HTTPSConnectionPool(host='sentry-read.svc.overdrive.com', port=443): Max retries exceeded with url: /chip/sync (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)")))', error_response='''>
Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 1099, in _validate_conn
    conn.connect()
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connection.py", line 653, in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connection.py", line 806, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\util\ssl_.py", line 465, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\util\ssl_.py", line 509, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\ssl.py", line 1041, in _create
    self.do_handshake()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\ssl.py", line 1319, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 793, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 491, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 877, in urlopen
    return self.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\connectionpool.py", line 847, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\urllib3\util\retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sentry-read.svc.overdrive.com', port=443): Max retries exceeded with url: /chip/sync (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\libby.py", line 350, in make_request
    res = session.send(
          ^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='sentry-read.svc.overdrive.com', port=443): Max retries exceeded with url: /chip/sync (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)")))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\odmpy.exe\__main__.py", line 7, in <module>
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\__main__.py", line 27, in main
    run()
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\odm.py", line 846, in run
    synced_state = libby_client.sync()
                   ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\libby.py", line 457, in sync
    res: Dict = self.make_request("chip/sync")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\libby.py", line 362, in make_request
    raise ClientConnectionError(str(conn_err)) from conn_err
odmpy.libby_errors.ClientConnectionError: <odmpy.libby_errors.ClientConnectionError; http_status=0, msg='HTTPSConnectionPool(host='sentry-read.svc.overdrive.com', port=443): Max retries exceeded with url: /chip/sync (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'sentry-read.svc.overdrive.com'. (_ssl.c:1000)")))', error_response='''>

To Reproduce

odmpy libby -d "c:\Users\joe\Downloads\Libby" --latest 1

Version/Environment
Please paste the contents of odmpy --version here.

C:\Users\joe>odmpy --version
odmpy 0.8.1 [Python 3.12.7-win32]
@aommm
Copy link

aommm commented Oct 30, 2024

Yep, this library can't download audiobooks easily anymore, see the various other open issues.

A potential workflow is:

  • Use the fork https://github.com/jordkh/odmpy
  • Get the ODM file manually from .overdrive.com
  • Then you can use odmpy libby somehow to download an MP3 from the ODM file

@thejoester
Copy link
Author

Yep, this library can't download audiobooks easily anymore, see the various other open issues.

A potential workflow is:

* Use the fork https://github.com/jordkh/odmpy

* Get the ODM file manually from .overdrive.com

* Then you can use `odmpy libby` somehow to download an MP3 from the ODM file

I have been doing the ODM method but my libraries have put a notice on their site that the ODM download will no longer be available next week

Can anyone assist me with using that fork?

@wtanksleyjr
Copy link

wtanksleyjr commented Oct 31, 2024 via email

@Prajna-Karuna
Copy link

I was able to download a book from Libby today, using a browser extension

Can you share the browser extension you used? I can live without the chapter data.

@wtanksleyjr
Copy link

I was able to download a book from Libby today, using a browser extension and can verify that the files are still in mp3 format.

Thank you for checking, I'm glad it turned out to be that simple of a change (so it's probably just the same problem that's been blocking us from Libby all along).

Unfortunately I can no longer find any chapter data using developer tools, which used to be possible.

Oof. That's a pity.

@thejoester
Copy link
Author

As of today, Nov 13, 2024, you can no longer acquire odm files from Overdrive. I tried; not possible. But the wording of the notice from Overdrive which seemed to say that the mp3 format was being replaced with something else is misleading, poorly worded. I was able to download a book from Libby today, using a browser extension and can verify that the files are still in mp3 format. Unfortunately I can no longer find any chapter data using developer tools, which used to be possible.

What browser extension? The one I had no longer works either.

@thejoester
Copy link
Author

thejoester commented Nov 14, 2024

And do me a favor and reply that you've seen this comment.

Heard! Thanks 🙏

@jahlborn
Copy link

now that odm files can't be downloaded anymore, does anyone have any working solutions at this point?

@Ritergeek
Copy link

Overdrive just removed the option to download in Windows format for Overdrive. Presumably this means they disabled odm files. Any chance you can find a workaround?

@wtanksleyjr
Copy link

Not through this issue; there were people working on this through issue #69 , although my understanding is that we've all given up. I'll post the last active work I've found that anyone is still working on.

I recommend that this issue be closed - its bug is actually fixed, and the REAL problem is being worked on in another issue.

@Ritergeek
Copy link

Ritergeek commented Nov 14, 2024 via email

@joshcsmith13
Copy link

FYI, @Ritergeek , @wtanksleyjr, @jahlborn, et al.
Check out the comments and code here (apparently from the same author, Ping).
I was able to use a combination of odmpy, forked by jordkh, and this bookmarklet to get an MP3 download!
https://gist.github.com/ping/b58ae66359691db1d08f929a9e57a03d

@Ritergeek
Copy link

Thank you. Lesson learned!

@wtanksleyjr
Copy link

Thank you. Lesson learned!

No problem! By the way, odmpy dl can once again work, to a limited extent, using the link @joshcsmith13 posted immediately above. Check it out!

@vcalv
Copy link

vcalv commented Dec 23, 2024

I converted the bookmarklet submitted by @joshcsmith13 into a firefox extension.

It runs automatically in the pertinent pages and only there.

No need to save nor click the bookmarklet.

You can find it at https://github.com/vcalv/underdrive

Already signed by Mozilla so that you don't need to install it in the dev version of the browser.
This could also be a greasemonkey script, which would be a lot easier.

It also features auto-updates not hosted by Mozilla.

I've been using it and it works (I download on the console using https://github.com/vcalv/overdrive.sh)

This is however trivial to identify on the server side and I suspect might get people banned.
As for the legality, I assume it's as legal as before the link was hidden, but IANAL.

Use at your own risk.

@Ritergeek
Copy link

Ritergeek commented Dec 24, 2024 via email

@wtanksleyjr
Copy link

wtanksleyjr commented Dec 24, 2024 via email

@Ritergeek
Copy link

Ritergeek commented Dec 24, 2024 via email

@doctorcolossus
Copy link

doctorcolossus commented Dec 24, 2024

Thank you to @joshcsmith13 for the workaround! For others who don't wish to bother with a bookmarklet or extension, I found it simpler to just search the page source (ctrl+u, ctrl+f) for the link with /audiobook-overdrive/, replace that part with /audiobook-mp3/, and open that to download the odm.

https://whatever.overdrive.com/media/download/audiobook-overdrive/{numbers}
https://whatever.overdrive.com/media/download/audiobook-mp3/{numbers}

@vcalv
Copy link

vcalv commented Dec 24, 2024

@wtanksleyjr Explained it correctly.

My Firefox extension just makes this trivial change automatically to the loan pages on overdrive.

You can basically use overdrive just like you used to a month or so ago.

I also have a libby extension that downloads the mp3 files but it's crude, not really automatic (you have to seek manually and it saves the files as you go) and as of now supports no metadata, not even titles.
It does support the file number, so you files like UUID_Part01.mp3 and the like.

I'm probably not releasing that one.

@hutonahill
Copy link

ive used @vcalv's extension to download the .odm file, but now i need to convert to .mp3s. it looks like overdrives app to do this is broken. i get a script error and the app crashes when i try to use it.

@doctorcolossus
Copy link

doctorcolossus commented Dec 25, 2024

@hutonahill , did you try odmpy dl {path_to_your_odm_file}?

@hutonahill
Copy link

I haven't yet. Working on installing the tool right now, but my pip has been screwed by something and I need to fix it first

@doctorcolossus
Copy link

I haven't yet. Working on installing the tool right now, but my pip has been screwed by something and I need to fix it first

Okay, good luck! odmpy dl worked for me. It may help to try using a Python virtual environment. Or to just use a one-off Docker container. docker run -it python /bin/bash, then your pip install command, and odmpy dl. You'd just need to volume-mount your odm file or download it straight into the container, then docker cp your mp3s back out afterwards.

@vcalv
Copy link

vcalv commented Dec 25, 2024

I haven't yet. Working on installing the tool right now, but my pip has been screwed by something and I need to fix it first

There's a bash script with no python dependencies.

Only a bunch of CLI commands you most likely already have.

https://github.com/vcalv/overdrive.sh

It would be completely possible to do this in the firefox extension, but I really don't see the point since so many tools already support it.
I guess people on windows or not CLI savvy would probably prefer that.

If there is a lot of demand or a pull request I might consider it though.

@Ritergeek
Copy link

Ritergeek commented Dec 27, 2024 via email

@doctorcolossus
Copy link

doctorcolossus commented Dec 27, 2024

Hey @Ritergeek . Firstly my explanation was simply a description of how to manually accomplish the same thing @joshcsmith13's bookmarklet does, and presumably @vcalv's extension too, since they wrote that they based it on @joshcsmith13's bookmarklet. So I don't know who first discovered that trick, but I can't take credit for it.

To address your confusion, there is no need to edit the source code. You only need to open it and search it to find what you need. OverDrive is apparently still serving the .odm files, but just not showing the link to them, leading the casual user to believe that they no longer exist when they actually still do, just no longer in plain view. The workaround is just to reconstruct what the link would be by finding the loan ID, so that is your goal in searching the source code. The .odm files can still be downloaded at URLs like https://whatever.overdrive.com/media/download/audiobook-mp3/{numbers}, where I guess that {numbers} is the ID of the book or the loan or something. And even though OverDrive is no longer showing you that exact link, you can still find links in the source code for https://whatever.overdrive.com/media/download/audiobook-overdrive/{numbers}, which is obviously very similar and contains the numbers we want (the audiobook-overdrive links must serve some other purpose which is still in use and not yet deprecated... you could check what's at them if you're curious - I didn't bother -but it's surely some page with details about your loan or something). Anyway, if you just change audiobook-overdrive to audiobook-mp3, the resulting URL is where you'll find your desired .odm file, and so if you just paste that modification into your browser address bar, it should magically download it.

@joshcsmith13's bookmarklet and @vcalv's extension are simply ways of automating that process to make it quicker. I just find them to be overkill for my purposes, when I can just use a text editor to change https://whatever.overdrive.com/media/download/audiobook-overdrive/{numbers} to https://whatever.overdrive.com/media/download/audiobook-mp3/{numbers}. It's a literal one-liner which I personally need to do only maybe once or twice a month, so for me it doesn't justify installing any kind of dedicated, specialized tool. But if you are downloading them by the dozen, then maybe one of those tools could make your life more convenient. I would personally still just use my text editor vim, but that's just me. Unfortunately though, I doubt that this workaround will continue working for very much longer. It is obviously an oversight on the part of OverDrive, unless it was intentionally "overlooked" temporarily by some benevolent employee there. In any case, I think this loophole will be found out sooner or later and patched up, so get your .odms while you can! But that's the other reason why I personally don't want to install anything, since I don't foresee it being of use for much longer.

Lastly, to address your concern about the safety of editing source code. Source code is served from a central server to your computer, and afterwards exists in both places. You are free to change your copy however you like, and you could do that using a text editor or your browser's developer toolbox, but that wouldn't affect the copy stored on the site's server and therefore wouldn't impact other users. But in any case, that isn't necessary to get your .odm. Just use a text editor or anything you like, and the address bar. You could even paste the unmodified link into the address bar and use the address bar itself to edit the link as needed before hitting enter or 'go'. In this paragraph I'm simply addressing your hypothetical security concerns.

@Ritergeek
Copy link

Ritergeek commented Dec 28, 2024 via email

@Ritergeek
Copy link

Has anyone successfully converted a freshly downloaded odm file now that the Overdrive app refuses to process them? BTW, the extension I've used to download them is the Underdrive one.

@wtanksleyjr
Copy link

@Ritergeek , when you say "converted" I assume you mean "downloaded." Yes, odmpy dl still works to download once you have the ODM file, even the unpatched one on this site.

@vcalv
Copy link

vcalv commented Dec 28, 2024

What exactly is the problem with the overdrive app?

Did these problems start after and upgrade or do they also exist with older versions?

@wtanksleyjr
Copy link

@vcalv I think he's talking about the official Overdrive app, which stopped working when they removed support for its media type. It's been officially only supported in one version for a long long time.

@vcalv
Copy link

vcalv commented Dec 28, 2024

Just a heads up.

These odm files have a short validity. After a while (hours?) you will not be able to checkout the item.
The solution is to download a new odm file and everything should work.

@mkgtu
Copy link

mkgtu commented Dec 28, 2024

FYI The Overdrive mobile app for Android still works. You can use it to open the odm. It'll load and download the book. Important: save the odm and open it from a FILE MANAGER, not from a browser, or email app, etc. If you open it from browser or email it will open the OD app, but not the new book. Don't know why that is; it just is.

@Ritergeek
Copy link

Ritergeek commented Dec 28, 2024 via email

@Ritergeek
Copy link

Hey mkgtu, I just tried your process. Since I use gmail on all devices, I didn't have to send, just opened the draft on my phone and downloaded the file. Following your instructions, I selected the appropriate app to open it. The app opened, but ignored the file as if the command had never been sent. Alas! This was also the case with a second file.

@ZolaLa9
Copy link

ZolaLa9 commented Dec 28, 2024

... I once posted frequently and extensively (on GitHub and elsewhere) all kinds of how-to guides for these kinds of things. In the end that got me banned from Libby and Overdrive for violating their terms and conditions. It took a lot of begging and pleading "ignorance" to finally get reinstated with warnings not to re-offend. I don't want to go through that again. It should also serve as fair warning to others who create and publicize such methods that Overdive, Inc is watching and taking down user names.

@mkgtu - Interesting. How far do you think OverDrive Inc's monitoring is going? 1) Monitoring online forums for people who are creating and publicizing such methods? (yes), 2) Monitoring who is downloading .odm files to obtain books (a method that should no longer work and therefore would raise red flags), 3) Monitoring who is using the Listen in Browser method to skim a book and download mp3 files without ever listening to the whole book in the browser or Libby app (which I assume they can tell based on time spent reading)?

@vcalv
Copy link

vcalv commented Dec 29, 2024

The extension seems to have no effect in Firefox mobile

There is no way that the extension will work on Firefox android.

Extensions for mobile are highly curated.
In fact, most extensions in the store are not available for android, despite the technical hurdles being quite limited.
It's a political decision.

In the end that got me banned from Libby and Overdrive for violating their terms and conditions.

How did they identify you? Did you use the same login/username.

I maintain that it's trivial for the serverside to know who is doing this, but I also think that downloading something you are allowed to listen to should be OK.

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