【问题标题】:Google API returning same volume many timesGoogle API 多次返回相同的音量
【发布时间】:2023-01-25 04:28:30
【问题描述】:

如果你使用谷歌的 API,你会得到一些书。例子:

https://www.googleapis.com/books/v1/volumes?q=harry&printType=books&startIndex=0&maxResults=40

这将获得 40 本独特的书籍。

现在,如果你使用分页,你只会一次又一次地得到相同的书。

尝试 https://www.googleapis.com/books/v1/volumes?q=harry&printType=books&startIndex=0&maxResults=8

然后https://www.googleapis.com/books/v1/volumes?q=harry&printType=books&startIndex=8&maxResults=8

然后https://www.googleapis.com/books/v1/volumes?q=harry&printType=books&startIndex=16&maxResults=8

每次您都会得到同一本书,例如Labor and Monopoly Capital,但如果您不使用分页则不会。

我猜 Google 再也请不起真正的工程师了。


真是笑话。多次运行(刷新页面)。它在两本书之间交替。

https://www.googleapis.com/books/v1/volumes?q=harry&printType=books&startIndex=7&maxResults=1

totalItems在结果改变的时候也会改变。多么尴尬。

【问题讨论】:

    标签: google-books


    【解决方案1】:

    也在为此苦苦挣扎。

    每页的 totalItems 变化。

    此外,我使用 2 个 orderBy 选项得到了不同的结果。相同的查询,但更改 orderBy 会影响结果数。还没有找到这些问题的真正答案......

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多