【问题标题】:Getting all search results from Github API从 Github API 获取所有搜索结果
【发布时间】:2016-07-31 05:11:07
【问题描述】:

我试图在 Github 上搜索所有包含自述文件中单词 article 的存储库。

我尝试了两种方法:

  1. API:https://api.github.com/search/repositories?q=article&in=readme
  2. Github 搜索框:https://github.com/search?utf8=%E2%9C%93&q=article+in%3Areadme&type=Repositories&ref=searchresults

第一种方法说总共有 9921 个结果,"total_count": 9921,,而搜索框找到 77638 个存储库。

为什么会出现差异?

【问题讨论】:

    标签: github github-api


    【解决方案1】:

    advanced search page 表明:

    • in: 仅用于代码搜索
    • 一个通用术语用于所有搜索(-in: 将被这些搜索忽略,代码搜索除外)

    所以:

    • 9921 是包含articlereadme 文件的编号
    • 77638 是包含 article 文件或标题中的 artienter code herecle 的 repo 数量。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-23
      • 1970-01-01
      • 2015-02-14
      • 1970-01-01
      • 2011-06-26
      • 2018-03-24
      • 2019-09-10
      相关资源
      最近更新 更多