ping / libby-calibre-plugin

OverDrive Libby Plugin for calibre
https://www.mobileread.com/forums/showthread.php?t=354816
GNU General Public License v3.0
66 stars 13 forks source link

Can't download HTTP Error 403: Forbidden #27

Open jessRun opened 5 months ago

jessRun commented 5 months ago

`calibre, version 7.8.0 ERROR: Unhandled exception: ClientForbiddenError: Failed to download e-book

HTTP Error 403: Forbidden

calibre 7.8 embedded-python: True macOS-14.4.1-arm64-arm-64bit Darwin ('64bit', '') ('Darwin', '23.4.0', 'Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030') Python 3.11.5 OSX: ('14.4.1', ('', '', ''), 'arm64') Interface language: None EXE path: /Applications/calibre.app/Contents/MacOS/calibre Successfully initialized third party plugins: DeACSM (0, 0, 16) && DeDRM (10, 0, 3) && BookFusion Plugin (0, 8, 1) && Count Pages (1, 13, 6) && Goodreads (1, 8, 1) && Goodreads Sync (1, 16, 5) && Import List (1, 9, 4) && Job Spy (1, 0, 239) && Modify ePub (1, 8, 3) && OverDrive Libby (0, 1, 9) Traceback (most recent call last): File "calibre_plugins.overdrive_libby.libby.client", line 520, in send_request response = req_opener.open(req, timeout=self.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "urllib/request.py", line 525, in open File "urllib/request.py", line 634, in http_response File "urllib/request.py", line 563, in error File "urllib/request.py", line 496, in _call_chain File "urllib/request.py", line 643, in http_error_default urllib.error.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "calibre/gui2/threaded_jobs.py", line 85, in start_work File "calibre_plugins.overdrive_libby.ebook_download", line 50, in call downloaded_filepath = self._custom_download( ^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.overdrive_libby.ebook_download", line 94, in _custom_download res_content = libby_client.fulfill_loan_file( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.overdrive_libby.libby.client", line 808, in fulfill_loan_file res: bytes = self.send_request( ^^^^^^^^^^^^^^^^^^ File "calibre_plugins.overdrive_libby.libby.client", line 540, in send_request ErrorHandler.process(e, error_response) File "calibre_plugins.overdrive_libby.libby.errors", line 143, in process raise error_info["error"]( calibre_plugins.overdrive_libby.libby.errors.ClientForbiddenError: <calibre_plugins.overdrive_libby.libby.errors.ClientForbiddenError; http_status=403, msg='HTTP Error 403: Forbidden', error_response=' ''> `

Have tried re-installing, regenerating Libby login, clearing cache. Using Calibre 7.8. Anyone else having problems? Have any suggestions for troubleshooting?

SeriousHornet commented 5 months ago

Yep, I received the same error just now. It was working fine until yesterday, so this must be from the Libby side. They must have blocked it. Currently I'll have to move to manual downloading from the libby site and load it in Calibre. I will let you know if I find a workaround.

LoisGNS commented 5 months ago

I'm having trouble downloading magazines (just in the past day or two):

calibre, version 6.14.1 ERROR: Unhandled exception: KeyError: Failed to download e-book

calibre 6.14.1 Portable embedded-python: True Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19045') Python 3.10.1 Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeACSM (0, 0, 16) && Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 10, 0) && Access Aide (0, 1, 13) && Action Chains (1, 18, 19) && Annotations (1, 17, 13) && Calibre Power Search Plugin (2, 2, 0) && CalibreSpy (1, 0, 92) && Count Pages (1, 13, 6) && DOC Input (1, 0, 1) && Ebook Translator (2, 3, 3) && Editor Chains (0, 8, 3) && EpubMerge (2, 18, 0) && EpubSplit (3, 6, 0) && FanFicFare (4, 20, 0) && FictionDB (1, 4, 1) && Find Duplicates (1, 10, 9) && GetFileName (0, 2, 0) && Goodreads (1, 8, 1) && Goodreads_Rating (4, 0, 0) && Job Spy (1, 0, 205) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0) && Set KFX metadata (from KFX Output) (2, 3, 1) && KFX Output (2, 3, 1) && Kindle Collections (1, 7, 29) && KindleUnpack - The Plugin (0, 83, 1) && Mass Search-Replace (1, 7, 1) && Media File Importer (1, 0, 27) && Modify ePub (1, 8, 2) && MultiColumnSearch (1, 0, 96) && Open With (1, 8, 1) && OverDrive Libby (0, 1, 9) && Overdrive Link (2, 57, 0) && Reading List (1, 15, 1) && Save To Format (0, 0, 6) && Search The Internet (1, 10, 4) && Similar Stories (1, 0, 58) && Standard Ebooks (1, 0, 0) && TTS to MP3 (0, 6, 0) && View Manager (1, 10, 2) && Wiki Reader (2, 2, 1) && all recipes Recipe Reader (1, 0, 2) && Overdrive Link Metadata Source (2, 57, 0) Traceback (most recent call last): File "calibre\gui2\threaded_jobs.py", line 82, in start_work File "calibre_plugins.overdrive_libby.magazine_download", line 387, in call File "calibre_plugins.overdrive_libby.magazine_download", line 467, in _custom_download File "calibre_plugins.overdrive_libby.libby.client", line 822, in process_ebook KeyError: 'openbook'

sarcheer commented 5 months ago

Also started receiving this error when opening the plugin on both 7.8 and 7.9.

p1nkyy commented 5 months ago

I hope @ping would come along and update. Pretty please...

p1nkyy commented 5 months ago

Someone found a solution (temporarily).

1. In your browser, open your dev console (ctrl-shift-I or F12 for me).
2. Go to the network tab, click the cog at the top-right and make sure "Persist Logs" is on.
3. Go to https://libbyapp.com/.
4. In the dev console, type "sentry" into the filter bar.
5. Click on the furthest-down entry that is a "GET" request.
6. In the right panel, go into the "Request Headers" and find "Authorization" -- its format should be "Bearer" followed by a long string of characters. Copy just the long string.
7. Make sure Calibre is closed, and open the plugin config file (%APPDATA%\calibre\plugins\overdrive_libby.json on Windows, unsure Mac/Linux paths).
8. Find the line for "libby_token", and replace its value with the one you copied in step 6.
9. Open Calibre and the plugin should work as expected now.

The line should look something like "libby_token": "eyJ0eX", (except the token will be hundreds of characters long. )

The path for the plugin config file for Mac would be _/Users/USERNAME/Library/Preferences/calibre/plugins/overdrivelibby.json To get to it you could also open Calibre, go to Preferences, Miscellaneous, Open Calibre Configuration Folder, then close the app when the folder opens.

And if you're using Chrome for the first steps, instead of Persist Logs, it's called Preserve Logs. So tick that and then the GET request should have an icon that looks like this: {;} and the name showed up for me as counts?cards= string of numbers and symbols

LoisGNS commented 5 months ago

Many (including me) have posted on MobileRead that this isn't working for them, unfortunately.

p1nkyy commented 5 months ago

Many (including me) have posted on MobileRead that this isn't working for them, unfortunately.

It didn't work for magazines. If it doesn't work for you for books then you must be copying the string incorrectly or something. Try copying the whole thing instead of blocking it manually and remove Bearer in front of the string. It finally worked for me.

LoisGNS commented 5 months ago

I only need it for magazines. For books, I download directly from the library website, then import, since when I downloaded them directly all I got was an .acsm file, not the actual book anyway. Unfortunately, there's no way (that I know of) to get the magazines directly from the library site. I was often getting additional errors when I marked & copied just the relevant part, so if I retry, I'll try it as you suggest, which (if I understand correctly) is copy everything from "Bearer" to the end of the token, paste it into the json file, and then delete "Bearer"?

Edit: I tried it this way, but not only do magazine-downloads still not work, but I get errors when I load the plugin. All I can do is revert back to the previous .json file. I am using notepad to open and paste the token into the file. Is there something else I should be using? But unless there's a way to restore magazine downloads, it doesn't seem to be worth the effort, since everything but downloading works with the un-edited .json file.

SeriousHornet commented 5 months ago

I only need it for magazines. For books, I download directly from the library website, then import, since when I downloaded them directly all I got was an .acsm file, not the actual book anyway. Unfortunately, there's no way (that I know of) to get the magazines directly from the library site. I was often getting additional errors when I marked & copied just the relevant part, so if I retry, I'll try it as you suggest, which (if I understand correctly) is copy everything from "Bearer" to the end of the token, paste it into the json file, and then delete "Bearer"?

Edit: I tried it this way, but not only do magazine-downloads still not work, but I get errors when I load the plugin. All I can do is revert back to the previous .json file. I am using notepad to open and paste the token into the file. Is there something else I should be using? But unless there's a way to restore magazine downloads, it doesn't seem to be worth the effort, since everything but downloading works with the un-edited .json file.

Yes, when you download books through the plugin it will give you .acsm file which will be automatically converted to .epub if you have the DeACSM plugin installed. That's how I set it up on my pc. It worked flawlessly till this 403 error.

SeriousHornet commented 5 months ago

Someone found a solution (temporarily).

1. In your browser, open your dev console (ctrl-shift-I or F12 for me).
2. Go to the network tab, click the cog at the top-right and make sure "Persist Logs" is on.
3. Go to https://libbyapp.com/.
4. In the dev console, type "sentry" into the filter bar.
5. Click on the furthest-down entry that is a "GET" request.
6. In the right panel, go into the "Request Headers" and find "Authorization" -- its format should be "Bearer" followed by a long string of characters. Copy just the long string.
7. Make sure Calibre is closed, and open the plugin config file (%APPDATA%\calibre\plugins\overdrive_libby.json on Windows, unsure Mac/Linux paths).
8. Find the line for "libby_token", and replace its value with the one you copied in step 6.
9. Open Calibre and the plugin should work as expected now.

The line should look something like "libby_token": "eyJ0eX", (except the token will be hundreds of characters long. )

The path for the plugin config file for Mac would be _/Users/USERNAME/Library/Preferences/calibre/plugins/overdrivelibby.json To get to it you could also open Calibre, go to Preferences, Miscellaneous, Open Calibre Configuration Folder, then close the app when the folder opens.

And if you're using Chrome for the first steps, instead of Persist Logs, it's called Preserve Logs. So tick that and then the GET request should have an icon that looks like this: {;} and the name showed up for me as counts?cards= string of numbers and symbols

Can confirm this works for downloading books now!! Awesome!

LoisGNS commented 5 months ago

Yes, when you download books through the plugin it will give you .acsm file which will be automatically converted to .epub if you have the DeACSM plugin installed. That's how I set it up on my pc. It worked flawlessly till this 403 error.

I do have that plugin, but it hasn't automatically converted for me, hence my always downloading more directly.

Also, I've tried multiple times to enter the token from the website, and it always gives me errors when starting up the plugin, so I end up restoring the .json from a backed-up copy. Do I need to use a certain editor to make it work? I've been using Notepad. Though in the end, if it doesn't let me download magazines, I'm not sure it's worth the effort, since everything else works the way I'm used to using it.

SeriousHornet commented 5 months ago

Yes, when you download books through the plugin it will give you .acsm file which will be automatically converted to .epub if you have the DeACSM plugin installed. That's how I set it up on my pc. It worked flawlessly till this 403 error.

I do have that plugin, but it hasn't automatically converted for me, hence my always downloading more directly.

Also, I've tried multiple times to enter the token from the website, and it always gives me errors when starting up the plugin, so I end up restoring the .json from a backed-up copy. Do I need to use a certain editor to make it work? I've been using Notepad. Though in the end, if it doesn't let me download magazines, I'm not sure it's worth the effort since everything else works the way I'm used to using it.

  1. Did you input the Adobe Digital Editions key in the DeACSM plug-in?
  2. Where did you copy the token from? For me, it was not the last entry, but two before that. I would suggest removing the Libby plugin completely, reinstalling it and editing the .json file. I used Notepad++ for editing.

I get if you wonder its worth the effort. For me, my main mode getting books is through libby as their books are neatly formatted. So this work flow suits me. It might vary for you though.

LoisGNS commented 5 months ago
1. Did you input the Adobe Digital Editions key in the DeACSM plug-in?

2. Where did you copy the token from? For me, it was not the last entry, but two before that. I would suggest removing the Libby plugin completely, reinstalling it and editing the .json file. I used Notepad++ for editing.
  1. The plugin says "Authorized with ADE ID (AdobeID) xxxxxxxx on device xxxxx, emulating ADE 2.01 (9.3.58046). I routinely download from the library & it opens in Adobe Digital Editions. Drag/drop that into Calibre.
  2. The instructions said to use the last listing with "sentry" in it, and click GET. Under File, it says "counts?cards=xxxxxxxx,xxxxxxxx". Two lines above that, under "file" there is a sequence of 7 numbers, as opposed to 8 numbers-comma-8 numbers.

Are you suggesting I should use the one with only one number and not the "cards=..." ? However, flipping between them (and a few similar ones), the token looks exactly the same. I didn't literally compare them byte for byte, but I would expect a quick flip to show a change if there was any difference, and I don't see anything changing.

I've been using notepad, not notepad++; I just tried in Notepad++ and got the same kind of error trying to open the plugin as I got when using notepad, so it doesn't seem to make any difference, referencing a unicode character it didn't like.

UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)

The \u2026 character is an elipsis,

I found a MobileRead post suggesting copying with right-click rather than the more typical way, since the ellipsis might not be an actual character in the token, but instead indicating there were additional characters not shown. Using that actually allowed me to open the plugin without trouble, and I found I could even download a book as an epub, which had never worked before. But still no working magazine downloads, which is the main functionality I'm missing (and one I had been using a lot).

SeriousHornet commented 4 months ago

Yes, I have used right-click to copy the authentication code. They change the code occasionally, as I have already done it twice with a different code each time. This temporary fix is fine for books. But for magazines, sadly there seems to be no solution yet.

mr-berndt commented 3 months ago

I keep getting this error as well, practically every time I am trying to use the plugin. While it is nice to have the workaround, it would be even nicer if the fix got implemented into the plugin itself. Any info from @ping on this?

p1nkyy commented 3 months ago

If someone can take one for the team and make a donation (he listed his donation page) and leaving a nice message to him to please consider come online and update the plugin, I think it'd be great. I was going to do it but it requires credit card, if only it accepts Paypal.

LoisGNS commented 3 months ago

I'd consider it if I saw any sign that @ping is paying attention. @ping, if you're around and willing to take a look at this, there might be some donations coming your way. The magazine download capability is the thing I miss most, since the plugin is the only way I'm aware of to do that.

sgmoore commented 3 months ago

I keep getting this error as well, practically every time I am trying to use the plugin. While it is nice to have the workaround, it would be even nicer if the fix got implemented into the plugin itself

Can I ask how often you use the plugin?

I'm asking because I think this error doesn't happen if you use the plugin regularly.

I know I have not got this error for ages (feels like months) and that the token that you copy from the website expires after some time (I think it only lasts about a week). Also, when you open the plugin the token is refreshed. Hence my theory is that if you open the plugin every few days, then you never need to use the workaround.

I agree it would be nice if the fix got implemented into the plugin, but I don't think we can expect ping to help. He/She previously said that he/she didn't have the time and was looking for someone else to take over maintenance of the plugins and hasn't been active on github or the calibre forums.

LoisGNS commented 3 months ago

I use the plugin daily. I should say, however, that things are working fine for me with ebooks since I manually copied the code (once I found the magic method to copy it properly, since the more intuitive method didn't work), just not with magazines.

Although it's convenient to use the plugin for ebooks, it's also possible to download them directly from the libraries and then import. Magazines, though, were downloadable only via the plugin, so that's why to me getting that fixed has higher priority.

I didn't see an announcement from Ping that they didn't have the time, but since they haven't replied to these issues, it does seem likely that they aren't maintaining it anymore.

Is there anyone around who has the knowledge/experience to fix? I wish I did, but I don't.

sgmoore commented 3 months ago

I didn't see an announcement from Ping that they didn't have the time, but since they haven't replied to these issues, it does seem likely that they aren't maintaining it anymore.

I'm not sure if there was an announcement, but I think there may have been several mentions and one of them was at https://github.com/ping/libby-calibre-plugin/issues/12#issuecomment-1708279641

LoisGNS commented 3 months ago

I didn't see that post, so thanks for pointing it out. I do wish someone can take this on.

simon-techkid commented 1 month ago

Someone found a solution (temporarily).

1. In your browser, open your dev console (ctrl-shift-I or F12 for me).
2. Go to the network tab, click the cog at the top-right and make sure "Persist Logs" is on.
3. Go to https://libbyapp.com/.
4. In the dev console, type "sentry" into the filter bar.
5. Click on the furthest-down entry that is a "GET" request.
6. In the right panel, go into the "Request Headers" and find "Authorization" -- its format should be "Bearer" followed by a long string of characters. Copy just the long string.
7. Make sure Calibre is closed, and open the plugin config file (%APPDATA%\calibre\plugins\overdrive_libby.json on Windows, unsure Mac/Linux paths).
8. Find the line for "libby_token", and replace its value with the one you copied in step 6.
9. Open Calibre and the plugin should work as expected now.

The line should look something like "libby_token": "eyJ0eX", (except the token will be hundreds of characters long. )

The path for the plugin config file for Mac would be _/Users/USERNAME/Library/Preferences/calibre/plugins/overdrivelibby.json To get to it you could also open Calibre, go to Preferences, Miscellaneous, Open Calibre Configuration Folder, then close the app when the folder opens.

And if you're using Chrome for the first steps, instead of Persist Logs, it's called Preserve Logs. So tick that and then the GET request should have an icon that looks like this: {;} and the name showed up for me as counts?cards= string of numbers and symbols

I wrote a chrome extension that extracts the token, because the 403 error tends to repeat itself after days or weeks, even after applying this fix.

TheBookishDad commented 1 month ago

Someone found a solution (temporarily).

1. In your browser, open your dev console (ctrl-shift-I or F12 for me).
2. Go to the network tab, click the cog at the top-right and make sure "Persist Logs" is on.
3. Go to https://libbyapp.com/.
4. In the dev console, type "sentry" into the filter bar.
5. Click on the furthest-down entry that is a "GET" request.
6. In the right panel, go into the "Request Headers" and find "Authorization" -- its format should be "Bearer" followed by a long string of characters. Copy just the long string.
7. Make sure Calibre is closed, and open the plugin config file (%APPDATA%\calibre\plugins\overdrive_libby.json on Windows, unsure Mac/Linux paths).
8. Find the line for "libby_token", and replace its value with the one you copied in step 6.
9. Open Calibre and the plugin should work as expected now.

The line should look something like "libby_token": "eyJ0eX", (except the token will be hundreds of characters long. ) The path for the plugin config file for Mac would be _/Users/USERNAME/Library/Preferences/calibre/plugins/overdrivelibby.json To get to it you could also open Calibre, go to Preferences, Miscellaneous, Open Calibre Configuration Folder, then close the app when the folder opens. And if you're using Chrome for the first steps, instead of Persist Logs, it's called Preserve Logs. So tick that and then the GET request should have an icon that looks like this: {;} and the name showed up for me as counts?cards= string of numbers and symbols

I wrote a chrome extension that extracts the token, because the 403 error tends to repeat itself after days or weeks, even after applying this fix.

interesting, chrome wont allow it to be activated, well at least mine wont. Maybe orhers can try it.

simon-techkid commented 1 month ago

Someone found a solution (temporarily).

1. In your browser, open your dev console (ctrl-shift-I or F12 for me).
2. Go to the network tab, click the cog at the top-right and make sure "Persist Logs" is on.
3. Go to https://libbyapp.com/.
4. In the dev console, type "sentry" into the filter bar.
5. Click on the furthest-down entry that is a "GET" request.
6. In the right panel, go into the "Request Headers" and find "Authorization" -- its format should be "Bearer" followed by a long string of characters. Copy just the long string.
7. Make sure Calibre is closed, and open the plugin config file (%APPDATA%\calibre\plugins\overdrive_libby.json on Windows, unsure Mac/Linux paths).
8. Find the line for "libby_token", and replace its value with the one you copied in step 6.
9. Open Calibre and the plugin should work as expected now.

The line should look something like "libby_token": "eyJ0eX", (except the token will be hundreds of characters long. ) The path for the plugin config file for Mac would be _/Users/USERNAME/Library/Preferences/calibre/plugins/overdrivelibby.json To get to it you could also open Calibre, go to Preferences, Miscellaneous, Open Calibre Configuration Folder, then close the app when the folder opens. And if you're using Chrome for the first steps, instead of Persist Logs, it's called Preserve Logs. So tick that and then the GET request should have an icon that looks like this: {;} and the name showed up for me as counts?cards= string of numbers and symbols

I wrote a chrome extension that extracts the token, because the 403 error tends to repeat itself after days or weeks, even after applying this fix.

interesting, chrome wont allow it to be activated, well at least mine wont. Maybe orhers can try it.

Try downloading the extension as a ZIP file, unpacking the zip to a folder, going to chrome://extensions, enabling developer mode, then loading the extension as unpacked. Chrome likely had an issue with loading the packed extension because it wasn't signed by Google.

TheBookishDad commented 1 month ago

Someone found a solution (temporarily).

1. In your browser, open your dev console (ctrl-shift-I or F12 for me).
2. Go to the network tab, click the cog at the top-right and make sure "Persist Logs" is on.
3. Go to https://libbyapp.com/.
4. In the dev console, type "sentry" into the filter bar.
5. Click on the furthest-down entry that is a "GET" request.
6. In the right panel, go into the "Request Headers" and find "Authorization" -- its format should be "Bearer" followed by a long string of characters. Copy just the long string.
7. Make sure Calibre is closed, and open the plugin config file (%APPDATA%\calibre\plugins\overdrive_libby.json on Windows, unsure Mac/Linux paths).
8. Find the line for "libby_token", and replace its value with the one you copied in step 6.
9. Open Calibre and the plugin should work as expected now.

The line should look something like "libby_token": "eyJ0eX", (except the token will be hundreds of characters long.) The path for the plugin config file for Mac would be _/Users/USERNAME/Library/Preferences/calibre/plugins/overdrivelibby.json To get to it you could also open Calibre, go to Preferences, Miscellaneous, Open Calibre Configuration Folder, then close the app when the folder opens. And if you're using Chrome for the first steps, instead of Persist Logs, it's called Preserve Logs. So tick that and then the GET request should have an icon that looks like this: {;} and the name showed up for me as counts?cards= string of numbers and symbols

I wrote a chrome extension that extracts the token, because the 403 error tends to repeat itself after days or weeks, even after applying this fix.

interesting, chrome wont allow it to be activated, well at least mine wont. Maybe orhers can try it.

Try downloading the extension as a ZIP file, unpacking the zip to a folder, going to chrome://extensions, enabling developer mode, then loading the extension as unpacked. Chrome likely had an issue with loading the packed extension because it wasn't signed by Google.

That doesn't work either. when i try i get a missing manifest file or unreadable....i can drag the crx file to the extension tab but after its added i can't enable..

sgmoore commented 1 month ago

That doesn't work either. when i try i get a missing manifest file or unreadable

I got this work in Edge. This was done earlier before TheBoyLeastLikelyTo suggestion, but it was something similar.

In my case, I clicked on releases and download the source code (zip). Then extracted it and looked inside that folder until I could see the manifest.json file. Then went into edge, and open extensions and enabled "Developer mode" and selected "Load UnPacked" It asked for a folder and I browsed to the folder that contained the manifest.json file. (The windows browser window at this point only shows folders and not files, so you can not actually see the manifest.json file to confirm you are in the correct folder, but you should be able to see a sub-folder called icons.

The reason I mention the last bit is that the default for windows is to extract the files into a new folder based on the name of the file you have downloaded (In my case LibbyApp-Token-Final). But the files inside the zip file and already in a folder (in my case called LibbyApp-Token-Final), so you have to browse to the inner folder LibbyApp-Token-Final/LibbyApp-Token-Final.

simon-techkid commented 1 month ago

That doesn't work either. when i try i get a missing manifest file or unreadable

I got this work in Edge. This was done earlier before TheBoyLeastLikelyTo suggestion, but it was something similar.

In my case, I clicked on releases and download the source code (zip). Then extracted it and looked inside that folder until I could see the manifest.json file. Then went into edge, and open extensions and enabled "Developer mode" and selected "Load UnPacked" It asked for a folder and I browsed to the folder that contained the manifest.json file. (The windows browser window at this point only shows folders and not files, so you can not actually see the manifest.json file to confirm you are in the correct folder, but you should be able to see a sub-folder called icons.

The reason I mention the last bit is that the default for windows is to extract the files into a new folder based on the name of the file you have downloaded (In my case LibbyApp-Token-Final). But the files inside the zip file and already in a folder (in my case called LibbyApp-Token-Final), so you have to browse to the inner folder LibbyApp-Token-Final/LibbyApp-Token-Final.

I never thought to test for Edge. I am a ex-Chrome (now Firefox) user. Does it work the same in Edge as chrome due to shared chromium platform?

sgmoore commented 1 month ago

I never thought to test for Edge. I am a ex-Chrome (now Firefox) user. Does it work the same in Edge as chrome due to shared chromium platform?

Correct. I would not expect it to work on the old Edge (pre 2020) as that wasn't based on chromium

I am a ex-Chrome (now Firefox) user

Interesting. If you only started this extension yesterday, why choose to do it in Chrome rather than FireFox ?

Udoachim commented 1 month ago

Until now, manually retrieving the token worked for me, but since today the loans do not show up anymore as downloadable entries under "Loans". When clicking on the sync button, the line at the bottom reads the correct amount of loans and holds, but nothing shows up for download. Screenshot 2024-09-03 110559

sgmoore commented 1 month ago

Working ok for me. I presume 'Hide ebooks' is unticked and 'Include titles without downloadable formats' is ticked?

Failing that you might need to run in debug mode to see if any errors show up.

For example, you might need spicefather's fix detailed at https://github.com/ping/libby-calibre-plugin/pull/17

Udoachim commented 1 month ago

Thanks for the advice. After ticking "Include titles without downloadable formats" the book shows up with the format "Libby Book". Never had that before as other titles from the same library work just fine (all served as epub or pdf).

I also tried spicefather's fix, but that didn't make a difference.

Would the debug mode help to narrow down what makes this book special? How can I activate it? I didn't see it in the plugin's options.

sgmoore commented 1 month ago

Would the debug mode help to narrow down what makes this book special?

Unlikely. The fact that the book now shows would suggest the plugin is working fine.

If I had to guess, I would say this book is only available in one format which is the format used by the Libby app and the website. Most books are also available as either a epub or pdf and these can be downloaded. You can test that theory by logging into the libbyapp website or your library and see if you can download it there.

If I am correct, then the available formats may depend on your library. I'm guessing, but this information does not show up on the share link for example https://share.libbyapp.com/title/6835533 but does show up if you pick a random library e.g. https://libbyapp.com/library/cityoflondonuk/curated-1191972/page-1/6835533. So if might be an idea to see if other libraries treat this book the same.

p1nkyy commented 1 week ago

As per Sept 25 books download got Error 403: Forbidden again and the workaround above doesn't work :( Maybe it's end of the road for now? sigh

SeriousHornet commented 1 week ago

As per Sept 25 books download got Error 403: Forbidden again and the workaround above doesn't work :( Maybe it's end of the road for now? sigh

Yup. That looks like it. For now its gonna be download directly from Libby site and load it into Calibre. But searching and borrowing works fine in the plugin though.