我正在尝试获取给定github存储库中子文件夹“github”的内容。这似乎行不通。在
repo = g.get_repo("PyGithub/PyGithub")
contents = repo.get_contents("github")
while len(contents) > 1:
file_content = contents.pop(0)
if file_content.type == "dir":
contents.extend(repo.get_contents(file_content.path))
else:
print(file_content)
代码片段工作正常:
你犯了什么错误?在
相关问题 更多 >
编程相关推荐