【发布时间】:2020-03-28 09:46:32
【问题描述】:
我想知道是否有人可以帮助解决以下问题:
我正在获取一些用户数据 Github API v3,我注意到值“total_count”与每页记录数的总和不匹配,例如:
GET on https://api.github.com/search/users?q=location%3AGermany 返回位置设置为“德国”的用户,每页有 30 个结果。
{
"total_count": 102814,
"incomplete_results": false,
"items": [ user1, user2, user3, ...]
标题表明有 34 页(见“最后”)
<https://api.github.com/search/users?q=location%3AGermany&page=2>; rel="next", <https://api.github.com/search/users?q=location%3AGermany&page=34>; rel="last"
所以每页 30 个条目,34 页,总共 30 * 34 = 1'020;但这比预期的少100倍。或者换句话说,只有total_count 的1%。我错过了什么?
【问题讨论】:
标签: python github github-api