paperboi / kindle2notion

Export all clippings from your Kindle device to a database in Notion.
https://pypi.org/project/kindle2notion/
MIT License
886 stars 120 forks source link

Thumbnails fetched from Google Book API are not visible on browser #30

Closed paperboi closed 3 years ago

paperboi commented 3 years ago

Picture below for reference.

image

paperboi commented 3 years ago

For some reason, this keeps happening on Firefox. Your solution worked for Chrome and Microsoft Edge (I assume it must be the same for all other Chromium browsers).

Wonder what could be the reason behind this. Thanks for your contribution tho @guptaanmol184. Can you please look into this too?

guptaanmol184 commented 3 years ago

Hi @paperboi , Sure, I can check out the issue further in the weekend and get back.

I do want to add that I had only tested with firefox, for that is the main browser that I use, and the fix did seem to resolve the issue for me. If there are any specific details on how you are testing, can you please share them as might provide more information on the steps to reproduce and the cases I might be missing to check ?

paperboi commented 3 years ago

Hi @paperboi , Sure, I can check out the issue further in the weekend and get back.

I do want to add that I had only tested with firefox, for that is the main browser that I use, and the fix did seem to resolve the issue for me. If there are any specific details on how you are testing, can you please share them as might provide more information on the steps to reproduce and the cases I might be missing to check ?

Got it working finally! Had to make some considerations in the code to fetch from any response JSON objects with an imageLinks property than just the first responses'. Books with multiple editions may have missing covers or multiple covers and the current code would only check whether the first response JSON object would have a thumbnail. Wrote a for loop to go through all possible results and fetch the first one with a thumbnail listed.

Implemented the solution in the latest release. Thanks for contributing to the repo!

guptaanmol184 commented 3 years ago

Glad to hear that, that's definately a better approach to handle adding missing book covers. Cheers!