![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2021
Device: Kobo Glo HD (/Forma)
|
How to best write workaround for Google Books API Bug
Hi.
So, I came upon this Google Books API "bug" a few days ago: https://stackoverflow.com/questions/...-giving-output In my case the problematic ISBN was 9780786954377, e.g. https://books.google.com/books/feeds...:9780786954377 didn't return any results, while https://books.google.com/books/feeds...:9780786954377 returned the book as expected. I thought I'd make a PR for this, but need help to figure out the best solution out of the following. 1. Fallback to ISBN:XXX if no result is found when searching for isbn:XXX 1.a. ... if no author or title is set (this way the fallback won't affect "normal operation"). 2. Add support for checking "google" identifier and fetching data for the correct book without searching (seems like there's no way to search for the google identifier). 2. a. ... if no "isbn" identifier exist (this way you don't have to clear the google identifier if you change the isbn and want to search anew). Any opinions/other suggestions? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can check if the topmost result has the specified isbn and if not try with the alternate form. As for adding support for "google" is ther some motivation for that?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Nov 2021
Device: Kobo Glo HD (/Forma)
|
Quote:
The two suggestions was intended as one or the other. As I see it, the second suggestion however would be more work and more of a generic "workaround", but it would also provide a more "robust" way to identify a specific publication of a book on Google Books. |
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont think bothering with the google identifier is worth it. As for the PR, it is most welcome.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Arc Google maps api v2 is not working in kobo arc | Angel Shah | Kobo Tablets | 3 | 05-29-2013 11:27 AM |
Synopsis display bug, and workaround. | GeoffR | Kobo Reader | 1 | 04-08-2013 11:26 AM |
Wrong-cover bug workaround? | rwhe | Kobo Reader | 31 | 02-01-2013 05:33 PM |
ePubs and Google Font API | Justin Rotkowitz | ePub | 1 | 03-29-2011 11:33 AM |
calibre now uses the Google Books API to get metadata | kovidgoyal | Calibre | 9 | 03-23-2009 09:36 PM |