Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Libby setup codes don't work #78

Open
ParsonsGlory opened this issue Sep 18, 2024 · 24 comments
Open

Libby setup codes don't work #78

ParsonsGlory opened this issue Sep 18, 2024 · 24 comments

Comments

@ParsonsGlory
Copy link

Neither of the remaining options for generating setup codes works. The code for sonos speakers and the code for android auto generates the error: Could not log in with code.

Any suggestions anyone?

@wtanksleyjr
Copy link

Oh no. I can give some more detail - the failure is that one of the Libby steps sends an invalid certificate, which Python's parser rejects. odmpy seems to expect the error and just reports that authentication didn't work, but more is going on than usual. This discussion should be brought under the old thread #69, since it seems to belong to the same category.

@ParsonsGlory
Copy link
Author

ParsonsGlory commented Sep 18, 2024

The invalid certificate error seems to have been fixed ping/libby-calibre-plugin#33. Hopefully this work will be migrated to odmpy,

Edit: Fixed here https://github.com/jordkh/odmpy

@wtanksleyjr
Copy link

FYI, the message posted 2 weeks ago was edited to include a solution - if you were watching this post for a solution you wouldn't see it because edits don't get sent out to watchers, so I'm reposting it.

Hat tip: @ParsonsGlory

Fixed here https://github.com/jordkh/odmpy

@dideler
Copy link

dideler commented Oct 15, 2024

Any ideas how to get past the first-run of odmpy libby since Libby reversed the setup code flow as mentioned in #78 (comment)?

The code is now given from the device that has to recover the data. In other words, you can no longer get a code from a logged in session of Libby to give to odmpy.

Edit: Using the locally installed fork https://github.com/jordkh/odmpy with the alternative Sonos flow worked as it still has the logged-in session generate a code.
image

Now running into another error getting a 403 when opening an audiobook URL. But was able to get around that by downloading the ODM file manually from Overdrive web as in #70 (comment) and #69 (comment).

@wtanksleyjr
Copy link

wtanksleyjr commented Oct 15, 2024 via email

@oandpg
Copy link

oandpg commented Oct 23, 2024

Not working for me using the sonos/android/libby codes. still getting the same error.

@wtanksleyjr
Copy link

That's because it's not fixed in this repository, but it has been fixed at https://github.com/jordkh/odmpy .
The command I just ran to install this was python3 -m pip install git+https://git@github.com/jordkh/odmpy --upgrade --force-reinstall .

@oandpg
Copy link

oandpg commented Oct 23, 2024

Yes I installed it from the jordkh repo but it had not installed properly. can now get it to accept the code, and it displays the books, but any attempt to download results in a 403 error. The suggested workarounds of using an ODM file will disappear on the 13 nov when they stop displaying the mp3 option...

@wtanksleyjr
Copy link

wtanksleyjr commented Oct 23, 2024 via email

@jahlborn
Copy link

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

@wtanksleyjr
Copy link

Not really. Sorry, I wish we had the expertise, but with the author MIA and no other expert at hand there's not much to be done... I'm a programmer, but in this field I'm just flailing about.

@joshcsmith13
Copy link

joshcsmith13 commented Nov 19, 2024

I was able to use the forked version at https://github.com/jordkh/odmpy to complete the setup. Then, in order to get past the error downloading, I used the code and instructions for this "bookmarklet" to expose the "Download MP3" link on the Overdrive Loans web page: https://gist.github.com/ping/b58ae66359691db1d08f929a9e57a03d
(I also had to find/install ffmpeg and add it to my Windows PATH.)
Once I had the ODM file, I could run 'odmpy dl "filename.odm"' to get the mp3s.
whew...

@joshcsmith13
Copy link

You do have to run "odmpy dl" shortly after downloading the file or you will get an error about an expired odm file.

@jay3fer
Copy link

jay3fer commented Nov 27, 2024

I was able to use the forked version at https://github.com/jordkh/odmpy to complete the setup. Then, in order to get past the error downloading, I used the code and instructions for this "bookmarklet" to expose the "Download MP3" link on the overdrive/Libby web page: https://gist.github.com/ping/b58ae66359691db1d08f929a9e57a03d (I also had to find/install ffmpeg and add it to my Windows PATH.) Once I had the ODM file, I could run 'odmpy dl "filename.odm"' to get the mp3s. whew...

Amazing, thank you so much!!! I have my audiobooks back... :)

@wtanksleyjr
Copy link

Is anyone else getting nothing but errors from odmpy dl again? I can use the script to get odms, but the download seems to be blocked. At least for me. Anyone?

@t-shizzle
Copy link

Is anyone else getting nothing but errors from odmpy dl again? I can use the script to get odms, but the download seems to be blocked. At least for me. Anyone?

I just ran another download and it worked great. after getting the bookmark I run this at the command prompt
odmpy dl -d "c:\bot" "C:\Users\X\Downloads\Booktitle.odm"

After getting teh bookmark I just highlight the file and mouse drag the name to the command prompt and it brings over the file address. it all seems to work great for me. Have you tried it again today?

@wtanksleyjr
Copy link

Thank you for checking! I just tried again ... and this time it worked! WHEW.

@wolfkin
Copy link

wolfkin commented Dec 17, 2024

Got nothing yet.

  1. Used the following to setup from the fork
    python -m pip install git+https://git@github.com/jordkh/odmpy --upgrade --force-reinstall

  2. Completed setup odmpy libby using Sonos code.

  3. Took bookmarklet from internal instructions here.

  4. Opened up audiobook, clicked bookmarklet and nada.

  5. Attempted odmpy libby and I do get the interactive client that shows my listings.

odmpy Interactive Client for Libby
----------------------------------------------------------------------
Found 1 loan.
 1: Butter Honey Pig Bread                            Francesca Ekwuyasi
    * Expires: 2024-12-23  XXXXXXX Public Library

Download. Choose from 1-1 (separate choices with a space or leave blank to quit),
then press enter:

trace1.txt

  1. trying to download from the ODM isn't working either.
    trace2.txt

The ODM itself seems empty anyway
ODM_Contents.txt

  1. Just doubled checked and I do have ffmpeg installed and accessible from other things. Heck I still have Overdrive installed. We only got cut off OD a few weeks ago.

@wtanksleyjr
Copy link

You're good that the setup worked.

Instead of step 4, you should click the bookmarklet from your loans page, not from an "opened-up audiobook" (I'm not sure what that means BTW). In my case my loans page is at https://lapl.overdrive.com/account/loans. What it does is change the page so that all of the "Have Overdrive for Mac/Windows? >" links reveal their "Download" buttons (like they used to).

As step 5, you can then click on the Download links under the books you want, and you'll get the ODM file you'd have expected. Next you copy it to the machine running odmpy, and run odmpy dl <whatever the filename is>, with whatever options you want (I like -k to keep the cover.jpg for example).

@joshcsmith13
Copy link

you lost me with "#4: Opened up audiobook" You want to click/open/run the bookmarklet while on the Overdrive.com LOANS page. That should cause the "Download MP3 audiobook" link to appear.
image

....
what wtanksleyjr said! :)

I just did it today, so I'm confident that it still works.
image

@wolfkin
Copy link

wolfkin commented Dec 17, 2024

Ahh I see. I was trying the bookmarklet on Libby but I should have been using it on the Library page. That DID work. thank you.

The ODM failed in Overdrive. But it does seem to be working with odmpy. Incredibly slow... but working. I was going to wait until it finished for an update but I'll just edit this later and let this run for now.

Nevermind. Turns out it was my VPN. Download failed just before I hit submit and when I flicked it off it was golden. Regular speeds.

scz5xj08Db (Small)

My HatTip to you all. I didn't expect to get this all solved tonight.

@talosgl
Copy link

talosgl commented Dec 18, 2024

Got nothing yet.

  1. Used the following to setup from the fork
    python -m pip install git+https://git@github.com/jordkh/odmpy --upgrade --force-reinstall
  2. Completed setup odmpy libby using Sonos code.

I'm having trouble getting past this step to authenticate with the Sonos or the Android Auto code. I think I have latest on the fork:
$ odmpy --version
odmpy 0.8.1 [Python 3.13.1-win32]

I get this error every time:
Error: Could not log in with code.
Make sure that you have entered the right code and within the time limit.

EDIT/SOLVE: Apparently I don't need this for odmpy dl <filepath.odm> to work, because that works fine. Leaving my comment here in case someone else hits the same issue! (You will need the bookmarklet already set up to get that file).

@wtanksleyjr
Copy link

EDIT/SOLVE: Apparently I don't need this for odmpy dl <filepath.odm> to work, because that works fine. Leaving my comment here in case someone else hits the same issue! (You will need the bookmarklet already set up to get that file).

Yes, the fix discussed in this issue and available at the fork is ONLY needed if you want to do things like get a list of all the books you have checked out. It's not super-useful, although I have scripts that connect the two so that I can use another system to get book metadata.

It looks to me like you're running the version of odmpy at this site, not the one at the fork. Others have posted a Python command line which will install that one (and you might want to remove this one first).

@talosgl
Copy link

talosgl commented Dec 18, 2024

It looks to me like you're running the version of odmpy at this site, not the one at the fork. Others have posted a Python command line which will install that one (and you might want to remove this one first).

You're completely right. What I goober I am. Thanks for taking the time to reply and help me learn!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants