odmpy icon indicating copy to clipboard operation
odmpy copied to clipboard

Libby setup codes don't work

Open ParsonsGlory opened this issue 1 year ago • 24 comments

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?

ParsonsGlory avatar Sep 18 '24 04:09 ParsonsGlory

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.

wtanksleyjr avatar Sep 18 '24 14:09 wtanksleyjr

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

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

ParsonsGlory avatar Sep 18 '24 21:09 ParsonsGlory

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

wtanksleyjr avatar Oct 06 '24 03:10 wtanksleyjr

Any ideas how to get past the first-run of odmpy libby since Libby reversed the setup code flow as mentioned in https://github.com/ping/odmpy/issues/78#issuecomment-2357461176?

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 https://github.com/ping/odmpy/issues/70#issuecomment-2081232634 and https://github.com/ping/odmpy/issues/69#issuecomment-2078355058.

dideler avatar Oct 15 '24 14:10 dideler

Yes, from where it asks you for the code (instead of showing the code) you just click on either of the two options underneath it (Android Car, or Sonos); either one will give you a code in the old way.

-Wm

On Tue, Oct 15, 2024 at 7:16 AM Dennis Ideler @.***> wrote:

Any ideas how to get past the first-run of odmpy libby since Libby reversed the setup code flow as mentioned in #78 (comment) https://github.com/ping/odmpy/issues/78#issuecomment-2357461176?

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.

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

wtanksleyjr avatar Oct 15 '24 15:10 wtanksleyjr

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

oandpg avatar Oct 23 '24 07:10 oandpg

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://[email protected]/jordkh/odmpy --upgrade --force-reinstall .

wtanksleyjr avatar Oct 23 '24 15:10 wtanksleyjr

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

oandpg avatar Oct 23 '24 23:10 oandpg

Yes, they effectively shut Libby down for us a long time ago; the ODM workaround was all we had.

You're right that's going away next month.

And that's it for us.

I'm told that people have gotten mp3 files downloaded from the Libby interface, but this is not a part of programming I've dabbled in, and ping (the original author of odmpy) has been gone for a while.

-Wm

On Wed, Oct 23, 2024 at 4:48 PM oandpg @.***> wrote:

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

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

wtanksleyjr avatar Oct 23 '24 23:10 wtanksleyjr

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

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.

wtanksleyjr avatar Nov 15 '24 19:11 wtanksleyjr

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 avatar Nov 19 '24 21:11 joshcsmith13

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

joshcsmith13 avatar Nov 19 '24 21:11 joshcsmith13

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

jay3fer avatar Nov 27 '24 20:11 jay3fer

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?

wtanksleyjr avatar Nov 28 '24 02:11 wtanksleyjr

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?

t-shizzle avatar Nov 29 '24 04:11 t-shizzle

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

wtanksleyjr avatar Nov 29 '24 04:11 wtanksleyjr

Got nothing yet.

  1. Used the following to setup from the fork python -m pip install git+https://[email protected]/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.

wolfkin avatar Dec 17 '24 22:12 wolfkin

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

wtanksleyjr avatar Dec 17 '24 23:12 wtanksleyjr

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

joshcsmith13 avatar Dec 17 '24 23:12 joshcsmith13

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.

wolfkin avatar Dec 17 '24 23:12 wolfkin

Got nothing yet.

  1. Used the following to setup from the fork python -m pip install git+https://[email protected]/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).

talosgl avatar Dec 18 '24 07:12 talosgl

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

wtanksleyjr avatar Dec 18 '24 15:12 wtanksleyjr

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!

talosgl avatar Dec 18 '24 19:12 talosgl