我尝试使用以下python代码使用api" rubinius"
来获取项目https://api.github.com/repos/rubinius/rubinius/contributors?page=的贡献者代码是:
import json, requests
all_contributors = list()
page_count = 1
while True:
contributors = requests.get("https://api.github.com/repos/rubinius/rubinius/contributors?page=%d"%page_count)
if contributors != None and contributors.status_code == 200 and len(contributors.json()) > 0:
all_contributors = all_contributors + contributors.json()
else:
break
page_count = page_count + 1
count=len(all_contributors)
print("-------------------%d" %count)
总贡献者 349 ,在网站中,贡献者总数 408 ,我可以知道我的计划存在哪些问题吗?
谢谢