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

audio books not downloading #70

Closed
jahlborn opened this issue Apr 25, 2024 · 25 comments
Closed

audio books not downloading #70

jahlborn opened this issue Apr 25, 2024 · 25 comments

Comments

@jahlborn
Copy link

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]

@stenou
Copy link

stenou commented Apr 25, 2024

You can't use --direct anymore

@stenou
Copy link

stenou commented Apr 25, 2024

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

@mitrian7
Copy link

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.

@jahlborn
Copy link
Author

jahlborn commented Apr 25, 2024

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/

@wtanksleyjr
Copy link

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

@thejoester
Copy link

thejoester commented Apr 26, 2024

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
Copy link

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>

@wtanksleyjr
Copy link

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.

@Suburban-Vampire
Copy link

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.

@thejoester
Copy link

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

@Suburban-Vampire
Copy link

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!

@nerdguy1338
Copy link

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

@ziferius
Copy link

ziferius commented Apr 27, 2024

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.

@nerdguy1338
Copy link

nerdguy1338 commented Apr 27, 2024 via email

@Prajna-Karuna
Copy link

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

That is what I was missing. Thank you.

@wtanksleyjr
Copy link

wtanksleyjr commented May 3, 2024 via email

@stenou
Copy link

stenou commented May 8, 2024

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"]

@wtanksleyjr
Copy link

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.

@ComputerWolf
Copy link

ComputerWolf commented May 8, 2024

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

@stenou
Copy link

stenou commented May 10, 2024

They changed something again and it now doesn't work

@jayshomebrew
Copy link

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.

@wtanksleyjr
Copy link

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.

@factorymealy0m
Copy link

Any updates on this ?

@wtanksleyjr
Copy link

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.

@jahlborn
Copy link
Author

sure. watch #69 for updates.

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