odmpy icon indicating copy to clipboard operation
odmpy copied to clipboard

audio books not downloading

Open jahlborn opened this issue 1 year ago • 23 comments

Describe the problem i reset my libby config as noted elsewhere, but it seems like there are more issues (maybe some changes in the result data structures). got this error:

An unexpected error has occurred
Traceback (most recent call last):
  File "/home/james/.local/lib/python3.8/site-packages/odmpy/odm.py", line 950, in run
    openbook, toc = libby_client.process_audiobook(
  File "/home/james/.local/lib/python3.8/site-packages/odmpy/libby.py", line 837, in process_audiobook
    openbook = self.make_request(meta["urls"]["openbook"])
KeyError: 'openbook'

To Reproduce attempt to download an audiobook.

Version/Environment odmpy 0.8.1 [Python 3.8.10-linux]

jahlborn avatar Apr 25 '24 14:04 jahlborn

You can't use --direct anymore

stenou avatar Apr 25 '24 14:04 stenou

It looks like this library no longer works as of today. They have changed their auth scheme.

stenou avatar Apr 25 '24 15:04 stenou

Looks like they're systematically engineering all these download tools out of existence. First the Chrome extension (Libby Audiobook Exporter), then the Firefox extension (Libby Download), now odmpy. Only thing that still works (that I can find) is inspecting pages in developer mode.

mitrian7 avatar Apr 25 '24 15:04 mitrian7

Looks like they're systematically engineering all these download tools out of existence. First the Chrome extension (Libby Audiobook Exporter), then the Firefox extension (Libby Download), now odmpy. Only thing that still works (that I can find) is inspecting pages in developer mode.

apparently you can still use overdrive https://www.reddit.com/r/audiobooks/comments/13gt1fb/download_and_transfer_libby_audiobooks_through/

jahlborn avatar Apr 25 '24 16:04 jahlborn

Recommend we continue writing this up on the earlier bug report, and close this one.

wtanksleyjr avatar Apr 25 '24 18:04 wtanksleyjr

Opening audiobook "Fairy Tale"...
Downloaded odm to "c:\Users\joe\Downloads\Libby\fairy-tale-8740733.odm"
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\odmpy\odm.py", line 1210, in run
    process_odm(
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\processing\odm.py", line 135, in process_odm
    raise ValueError("Unable to find Metadata in ODM")
ValueError: Unable to find Metadata in ODM
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 1210, in run
    process_odm(
  File "C:\Users\joe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\odmpy\processing\odm.py", line 135, in process_odm
    raise ValueError("Unable to find Metadata in ODM")
ValueError: Unable to find Metadata in ODM

thejoester avatar Apr 26 '24 00:04 thejoester

Additionally when I look at the .odm file...

<!DOCTYPE html>
<html>
<head>
<title>Access Error</title>
<style>pre { font: 12px/18px monospace; }</style>
</head>
<body>
<pre>
{
  &quot;result&quot;: &quot;missing_chip&quot;,
  &quot;policies&quot;: {
    &quot;privacy&quot;: &quot;https://company.cdn.overdrive.com/policies/privacy-policy&quot;,
    &quot;terms&quot;: &quot;https://company.cdn.overdrive.com/policies/terms-and-conditions.htm&quot;,
    &quot;jobs&quot;: &quot;https://company.overdrive.com/careers&quot;
  }
}
</pre>
</body>
<script type="text/javascript" src="/scripts/bridge.js"></script>
<script type="text/javascript">setTimeout(function(){BRIDGE.transmit({name:'sentry:access:error',dest:'client',error:{origin:'Sentry'}});},500);</script>
</html>

thejoester avatar Apr 26 '24 00:04 thejoester

Highly recommend we close this, there are useful instructions for limited workarounds in #69 . For example, you can manually download an ODM file and then use odmpy to get the book.

wtanksleyjr avatar Apr 26 '24 00:04 wtanksleyjr

just to chime in here with a brief summary of the status of things as of 4/25/2024: -OverDrive is the company behind both the older OverDrive app and the newer Libby app. -the OverDrive app itself has been sunsetted by the company in favor of Libby -ODM Download Links have been REMOVED from public library web interfaces. As best as I can tell there is currently NO easy or direct way to get ahold of an ODM file for a borrowed book, period. It's just not a thing anymore.

-In the last few days OverDrive has made changes to the Libby app & infrastructure that explicitly break ALL third party downloading. -At the same time, all major browser extensions related to Libby have been taken down.

Suburban-Vampire avatar Apr 26 '24 04:04 Suburban-Vampire

-ODM Download Links have been REMOVED from public library web interfaces. As best as I can tell there is currently NO easy or direct way to get ahold of an ODM file for a borrowed book, period. It's just not a thing anymore.

This is not fully accurate. The Overdrive web pages still exist and you can download the .odm directly as well as through the app itself which still operates but is no longer supported and the app download is not published publicly but there is links above to get the .msi installer file.

thejoester avatar Apr 26 '24 04:04 thejoester

By jove, you're right! I actually did NOT know about the overdrive.com subdomain thing. Many thanks :)

For example, my main library interface (that they tell me to use) is wccls.bibliocommons.com. Unbeknownst to me, this means I can actually just go to wccls.overdrive.com to access a per-library interface where YES YOU CAN download ODM files, at least for now.

In my use case, I then fed the ODM to a Windows command line utility, Mbucari/OverdriveDownloader, which happily did get all the audio & metadata as expected.

It would seem the next big source of problems will be whenever Overdrive decides to shut that all down. Hopefully not soon!

Suburban-Vampire avatar Apr 26 '24 04:04 Suburban-Vampire

By jove, you're right! I actually did NOT know about the overdrive.com subdomain thing. Many thanks :)

For example, my main library interface (that they tell me to use) is wccls.bibliocommons.com. Unbeknownst to me, this means I can actually just go to wccls.overdrive.com to access a per-library interface where YES YOU CAN download ODM files, at least for now.

In my use case, I then fed the ODM to a Windows command line utility, Mbucari/OverdriveDownloader, which happily did get all the audio & metadata as expected.

It would seem the next big source of problems will be whenever Overdrive decides to shut that all down. Hopefully not soon!

The odm files you can download this way still work with odmpy DL file.odm

nerdguy1338 avatar Apr 27 '24 06:04 nerdguy1338

The OverDrive ODM download being 'complicated' or Overdrive hiding the library pages is currently (04/27/2024) overblown. They aren't hiding anything. Go to https://www.overdrive.com, in the top right hand corner, there is 'Find Library'; then type in the zip. Then login with your library credentials.

I use Firefox...... and Linux. So I needed to add an extension 'User-agent switcher' so switch to Firefox to masquerade as Windows.

Then, on your Library's overdrive page, click on my account (top right), then go to loans. Under the big 'Listen now in browser' button, there is a link a few lines down for 'Have OverDrive for Mac/Windows?' Click on that; a download MP3 audiobook pops up. That is the link to the real/fullsize odm file.

ziferius avatar Apr 27 '24 23:04 ziferius

Overblown? Maybe a bit but this process is what we were doing before odmpy. It's just so darn convenient!

On Sat, Apr 27, 2024, 7:19 PM ziferius @.***> wrote:

The OverDrive ODM download being 'complicated' or Overdrive hiding the library pages is currently (04/27/2024) overblown. They aren't hiding anything. Go to https://www.overdrive.com, in the top right hand corner, there is 'Find Library'; then type in the zip. Then login with your library credentials.

I use Firefox...... and Linux. So I needed to add an extension 'User-agent switcher' so switch to Windows.

Then, on your Library's overdrive page, click on my account (top right), then go to loans. Under the big 'Listen now in browser' button, there is a link a few lines down for 'Have OverDrive for Mac/Windows?' Click on that; a download MP3 audiobook pops up. That is the link to the real/fullsize odm file.

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

nerdguy1338 avatar Apr 27 '24 23:04 nerdguy1338

there is a link a few lines down for 'Have OverDrive for Mac/Windows?'

That is what I was missing. Thank you.

Prajna-Karuna avatar Apr 28 '24 12:04 Prajna-Karuna

Have you run odmpy before? If you haven't you need to get it set up, so I'll assume you have.

Just run odmpy dl <odmfilename>. It'll create a folder with all of the audio files and so on. I also like to use the -k option, since otherwise audiobookshelf has problems with the thumbnail.

-Wm

On Fri, May 3, 2024 at 1:20 PM pozix604 @.***> wrote:

Sorry, I don't follow. With the ODM file downloaded from the overdrive.com site, how do I now use odmpy to download the audiobook?

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

wtanksleyjr avatar May 03 '24 20:05 wtanksleyjr

I was able to download audiobooks using this PR

https://github.com/ping/odmpy/pull/71

Example Dockerfile to use the new branch

FROM debian

RUN apt update && apt install -y python3 python3-pip python3.11-venv git ffmpeg

RUN python3 -m venv /odmpy

ENV PATH="/odmpy/bin:$PATH"

RUN python3 -m pip install git+https://github.com/ahxxm/odmpy.git@fix-spine --upgrade --force-reinstall

RUN mkdir /books
WORKDIR /books
CMD ["/bin/bash"]

stenou avatar May 08 '24 18:05 stenou

Thank you, that's incredible, PLEASE post that to #69 which is supposed to contain the useful information for dealing with this. That's AWESOME.

wtanksleyjr avatar May 08 '24 18:05 wtanksleyjr

I was able to download audiobooks using this PR

#71

Example Dockerfile to use the new branch

FROM debian

RUN apt update && apt install -y python3 python3-pip python3.11-venv git ffmpeg

RUN python3 -m venv /odmpy

ENV PATH="/odmpy/bin:$PATH"

RUN python3 -m pip install git+https://github.com/ahxxm/odmpy.git@fix-spine --upgrade --force-reinstall

RUN mkdir /books
WORKDIR /books
CMD ["/bin/bash"]

This branch appears to have the same issue as the existing version. The odm files have an Access Error within them and won't work

ValueError: Unable to find Metadata in ODM

ComputerWolf avatar May 08 '24 19:05 ComputerWolf

They changed something again and it now doesn't work

stenou avatar May 10 '24 15:05 stenou

FYI, I've been using an older version without issues. Here's my process:

logon to overdrive.com download the .odm Screenshot_2024-05-12_06-35-09

pip3 install git+https://[email protected]/ping/[email protected] . . . Successfully built odmpy Installing collected packages: odmpy Successfully installed odmpy-0.4.8

python -m odmpy info *.odm

Screenshot_2024-05-12_06-45-48

python -m odmpy dl --chapters --merge --mergeformat mp3 --keepcover --keepmp3 *.odm

Screenshot_2024-05-12_06-49-19

all good.

jayshomebrew avatar May 12 '24 13:05 jayshomebrew

Any version of odmpy should work when you start with an ODM file, I'm using the most recent version. It's only the libby functionality that's dying.

wtanksleyjr avatar May 12 '24 14:05 wtanksleyjr

Any updates on this ?

factorymealy0m avatar May 20 '24 03:05 factorymealy0m

Just to be clear, all of this is completely broken now; they've ACTUALLY shut down the ODM downloads (not just the rumors you see above), and as other people mentioned above, have changed the Libby login process enough that we haven't been able to figure it out. Please watch issue #69 for more details, but please don't hold your breath.

If the person who opened this issue would close it, it would be less confusing.

wtanksleyjr avatar Nov 15 '24 19:11 wtanksleyjr

sure. watch #69 for updates.

jahlborn avatar Nov 15 '24 19:11 jahlborn