Google图书API-图书详细信息未返回 [英] Google Books API - Book Details not Returned

查看:82
本文介绍了Google图书API-图书详细信息未返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我开始将Google Books API用于正在构建的应用程序,并对结果感到满意.

So I started using the Google Books API for an application that I am building and I am fairly happy with the results.

但是我有时注意到一种奇怪的行为. 即使图书存在于数据库中,某些ISBN也不返回任何图书详细信息.
例如,如果我给出: https://www.googleapis.com/books/v1/volumes?q = isbn:0262527359
我收到以下响应:

But I have noticed a strange behaviour sometimes. Some ISBNs do not return any book details even though the book exists in the database.
For example, if I give: https://www.googleapis.com/books/v1/volumes?q=isbn:0262527359,
I get the following response:

{
 "kind": "books#volumes",
 "totalItems": 0
}

我在互联网上搜索了此问题,并找到了以下链接:
https://productforums.google.com/forum/#! topic/books-api/R5DvlRh-EKo

I digged around the internet regarding this problem and found this link:
https://productforums.google.com/forum/#!topic/books-api/R5DvlRh-EKo

他们通过在搜索查询中不提及isbn:来建议解决方法.因此,查询变为: https://www.googleapis.com/books/v1/volumes?q = 0262527359
这种方法并不完美,但这是我发现的唯一解决方法.

They suggest a workaround by not mentioning isbn: in the search query. So, the query becomes: https://www.googleapis.com/books/v1/volumes?q=0262527359
This method is not perfect but it's the only workaround I found.

那是我注意到另一个问题的时候. 网页响应 API调用.

That's when I noticed another problem. There is a mismatch between the description given on the webpage and the one in the response to the API call.

有人可以向我解释这些奇怪的行为吗?有更好的解决方案吗?

Can someone explain these strange behaviours to me? Are there any better solutions?

TIA.

推荐答案

所以我进行了一些挖掘,发现了这种奇怪的行为,当您的查询形式为...?q=isbn:0262527359时,得到的结果就是那些仅具有相同的isbn,并且当您使用...?q=0262527359形式的查询时,获得的结果是在任何书籍的记录字段中具有该编号的任何实例的书籍.它可以是版本isbn数组,也可以是任何其他形式,此查询将在所有字段中搜索匹配结果,而前一个查询将仅在isbn中搜索匹配结果

So i did some digging around and found out about this strange behaviour, when your query is of the form ...?q=isbn:0262527359, the results you get are the books that have this same isbn only and when you use the query of the form ...?q=0262527359, the results you get are the books that have any instance of this number in the record fields of any book. It can be either in editions isbn array or any other, this query will search all fields for matching results whereas the former query will only search isbn for matching results

这篇关于Google图书API-图书详细信息未返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆