paperboi / kindle2notion

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

Code fails when Author information isn't present in the clippings file #25

Closed rahulakrishna closed 3 years ago

rahulakrishna commented 3 years ago

Noticed that some Kindle titles don't have Author information. I faced this issue with "The Intelligent Investor" that I bought from the Kindle Store.

While it doesn't seem possible to fetch the Author info, it can be made so the code gracefully fails and uses an empty string for Author Name. I used a fix locally to get around the issue. Will make a PR later today if this issue is accepted.

Attaching images of clippings file and error message below.

image image
paperboi commented 3 years ago

Hi @rahulakrishna ! Thanks for raising this issue! Wasn't aware of this particular case with Kindle books. Will merge your changes with the main repo.