在不知道所有者的情况下通过 API 查找 GitHub 存储库

Find GitHub repository through the API without knowing the owner

我正在尝试从 requirements.txt 文件中爬取存储库列表,以获取有关我要使用的关联存储库的信息(例如许可证)。

因此,我没有存储库的 full_name,也没有 owner 信息。 例如我需要找到:

 https://github.com/schutera/HeartSeg-Dataset

不知道schutera

目前我正在尝试请求 https://api.github.com/search/repositories?q=name:HeartSeg-Dataset 但这给了我空项目:

{
  "total_count": 0,
  "incomplete_results": false,
  "items": [

  ]
}

我也 found 进行搜索的选项 in:name,但我不知道如何正确使用它:

HeartSeg in:name 匹配存储库名称中包含“HeartSeg”的存储库。但是,好吧,怎么样?

又是我。所以我对我已经做的和在我的问题中提出的内容并没有太过偏离:

in:name 被正确使用 https://api.github.com/search/repositories?q=HeartSeg-Dataset+in:name

工作起来很有魅力,剩下的就是字典运算。感谢您阅读到这里。