odmpy icon indicating copy to clipboard operation
odmpy copied to clipboard

Unable to download from libby

Open thejoester opened this issue 1 year ago • 56 comments

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]

thejoester avatar Oct 30 '24 12:10 thejoester

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

aommm avatar Oct 30 '24 12:10 aommm

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?

thejoester avatar Oct 31 '24 00:10 thejoester

That fork doesn't fix Libby operations EXCEPT to allow you to see your list of checked out books (which odmpy itself can no longer do). There's no fix yet for all of the changes Libby made to their download protocols -- it SHOULD be possible, but nobody has figured it out yet.

As you observe, "odmpy dl" will become completely impossible to use mid-November. What's worse is that they're going to turn off their "mp3" book type; I have no idea whether we even COULD download the other type. I wish I knew something about that.

Message ID: @.***>

wtanksleyjr avatar Oct 31 '24 02:10 wtanksleyjr

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.

Prajna-Karuna avatar Nov 13 '24 22:11 Prajna-Karuna

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.

wtanksleyjr avatar Nov 13 '24 22:11 wtanksleyjr

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 avatar Nov 13 '24 23:11 thejoester

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

Heard! Thanks 🙏

thejoester avatar Nov 14 '24 01:11 thejoester

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

jahlborn avatar Nov 14 '24 21:11 jahlborn

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?

Ritergeek avatar Nov 14 '24 21:11 Ritergeek

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.

wtanksleyjr avatar Nov 14 '24 22:11 wtanksleyjr

Thank you for the prompt reply. I hope the team can find a workaround because as of today, those odm files are no longer available for download as an Overdrive for Windows option. We are 100% stuck with Libby and that's 100% not okay with me for reasons I won't go into here.

I'll keep an eye on issue #69 and wish I had an inkling about coding so I could help.

Sharon Lippincott.

On Thu, Nov 14, 2024 at 4:12 PM William Tanksley Jr < @.***> wrote:

Not through this issue; there were people working on this through issue #69 https://github.com/ping/odmpy/issues/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.

— Reply to this email directly, view it on GitHub https://github.com/ping/odmpy/issues/81#issuecomment-2477510214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDWRLYF66MECEHAKVQFJCD2AUN6NAVCNFSM6AAAAABQ37IUEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZXGUYTAMRRGQ . You are receiving this because you commented.Message ID: @.***>

--

Visit me on the web: The Heart and Craft of Lifestory Writing http://heartandcraft.blogspot.com @.***

Ritergeek avatar Nov 14 '24 22:11 Ritergeek

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

joshcsmith13 avatar Nov 25 '24 21:11 joshcsmith13

Thank you. Lesson learned!

Ritergeek avatar Nov 30 '24 15:11 Ritergeek

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!

wtanksleyjr avatar Nov 30 '24 15:11 wtanksleyjr

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.

vcalv avatar Dec 23 '24 20:12 vcalv

I'm eager to try this, but could you please explain how it works? We log onto Libby and then what?

On Mon, Dec 23, 2024 at 2:15 PM vcalv @.***> wrote:

I converted the bookmarklet submitted by @joshcsmith13 https://github.com/joshcsmith13 into a firefox extension.

It runs automatically in the pertinent pages and only there.

No need to save of 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.

Use at your own risk.

— Reply to this email directly, view it on GitHub https://github.com/ping/odmpy/issues/81#issuecomment-2560248346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDWRL3J2Z235UGQ7J7MUH32HBVOJAVCNFSM6AAAAABQ37IUEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRQGI2DQMZUGY . You are receiving this because you were mentioned.Message ID: @.***>

Ritergeek avatar Dec 24 '24 17:12 Ritergeek

You log onto Overdrive (for example my library's page is https://lapl.overdrive.com/account/loans) and the moment you go to your loans page, you see buttons to click to download ODM files, one for each book. Without using this Javascript, you wouldn't see the buttons; it'd just tell you that the Overdrive client is no longer supported.

I use the bookmarklet, which means I go to that page and then click the bookmarklet. With this extension you go to the page and it looks like it used to, with the buttons right there and ready to be clicked.

Message ID: @.***>

wtanksleyjr avatar Dec 24 '24 19:12 wtanksleyjr

Thanks William. I'll work on figuring out how to use that bookmarklet or install the extension. 🤞🤞

On Tue, Dec 24, 2024 at 1:44 PM William Tanksley Jr < @.***> wrote:

You log onto Overdrive (for example my library's page is https://lapl.overdrive.com/account/loans) and the moment you go to your loans page, you see buttons to click to download ODM files, one for each book. Without using this Javascript, you wouldn't see the buttons; it'd just tell you that the Overdrive client is no longer supported.

I use the bookmarklet, which means I go to that page and then click the bookmarklet. With this extension you go to the page and it looks like it used to, with the buttons right there and ready to be clicked.

Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/ping/odmpy/issues/81#issuecomment-2561369255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDWRLZ4RJKOFMDNB3HP4CT2HG2SFAVCNFSM6AAAAABQ37IUEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRRGM3DSMRVGU . You are receiving this because you were mentioned.Message ID: @.***>

--

Visit me on the web: The Heart and Craft of Lifestory Writing http://heartandcraft.blogspot.com @.***

Ritergeek avatar Dec 24 '24 20:12 Ritergeek

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}

doctorcolossus avatar Dec 24 '24 23:12 doctorcolossus

@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.

vcalv avatar Dec 24 '24 23:12 vcalv

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.

hutonahill avatar Dec 25 '24 00:12 hutonahill

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

doctorcolossus avatar Dec 25 '24 01:12 doctorcolossus

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

hutonahill avatar Dec 25 '24 01:12 hutonahill

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.

doctorcolossus avatar Dec 25 '24 01:12 doctorcolossus

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.

vcalv avatar Dec 25 '24 16:12 vcalv

Casey Jones,

I just tried your trick of searching the page source. I found the link you mention, but am unable to edit it. What am a I missing? It's a little scary to think that just anyone could edit source code that way ...

On Tue, Dec 24, 2024 at 5:01 PM Casey Jones @.***> wrote:

Thank you to @joshcsmith13 https://github.com/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.

— Reply to this email directly, view it on GitHub https://github.com/ping/odmpy/issues/81#issuecomment-2561482397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDWRL4LOJIMQCY3F7ECZZT2HHRTBAVCNFSM6AAAAABQ37IUEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRRGQ4DEMZZG4 . You are receiving this because you were mentioned.Message ID: @.***>

--

Visit me on the web: The Heart and Craft of Lifestory Writing http://heartandcraft.blogspot.com @.***

Ritergeek avatar Dec 27 '24 22:12 Ritergeek

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.

doctorcolossus avatar Dec 27 '24 23:12 doctorcolossus

Casey,

Thank you for the extensive explanation. I'm sure I could follow your clear instructions now, but did figure out how to install the Firefox extension and it magically did download the ODM file for an audiobook I've had on hold. Now my next step is to master converting that to a useful MP3, hopefully with breaks.

On Fri, Dec 27, 2024 at 5:20 PM Casey Jones @.***> wrote:

Hey @Ritergeek https://github.com/Ritergeek . Firstly my explanation was simply a description of how to manually accomplish the same thing @joshcsmith13 https://github.com/joshcsmith13's bookmarklet does, and presumably @vcalv https://github.com/vcalv's extension too, since he said he also based it on @joshcsmith13 https://github.com/joshcsmith13's bookmarklet. So I can't take credit for that.

To address your confusion, there is no need to edit the source code. Your goal is simply to modify the link and then to paste the modified version into your browser address bar, or whatever else you want to use to download it. This is because OverDrive is apparently still serving the .odm files, but just not showing a link to them. And the workaround is to reconstruct what the link would be by finding the loan ID. And the loan ID is still contained in the source code for some other links related to your loan. 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 must serve some purpose which is still in use and hasn't yet been deprecated. You could check what is at those links to. Anyway, if you use the audiobook-mp3 one, that's where the .odm files you want are, and if you just paste that modification into your browser address bar, it should magically download them.

@joshcsmith13 https://github.com/joshcsmith13's bookmarklet and @vcalv https://github.com/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}. I personally need to do that maybe once or twice a month, so that just doesn't justify installing any kind of dedicated specialized tool in my mind. Plus, unfortunately, 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 by a 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!

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.

— Reply to this email directly, view it on GitHub https://github.com/ping/odmpy/issues/81#issuecomment-2564086178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDWRL5HOQ5GZ7FLAYLRTM32HXOC7AVCNFSM6AAAAABQ37IUEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRUGA4DMMJXHA . You are receiving this because you were mentioned.Message ID: @.***>

--

Visit me on the web: The Heart and Craft of Lifestory Writing http://heartandcraft.blogspot.com @.***

Ritergeek avatar Dec 28 '24 00:12 Ritergeek

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.

Ritergeek avatar Dec 28 '24 16:12 Ritergeek

@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.

wtanksleyjr avatar Dec 28 '24 16:12 wtanksleyjr