我在哪里可以找到 'youtube-v3-api-captions.json' 发现文档?

Where can I find the 'youtube-v3-api-captions.json' discovery document?

我正在尝试使用 YouTube API 获取视频字幕,但示例不完整:https://developers.google.com/youtube/v3/code_samples/python#create_and_manage_youtube_video_caption_tracks

具体来说,它有这个评论+代码:

# Trusted testers can download this discovery document from the developers page
# and it should be in the same directory with the code.
with open("youtube-v3-api-captions.json", "r") as f:
  doc = f.read()
  return build_from_document(doc, http=credentials.authorize(httplib2.Http()))

但是根本不清楚在哪里可以找到 youtube-v3-api-captions.json 文件。

在哪里可以找到?

它似乎在这里:https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest

这是通过在 https://developers.google.com/discovery/v1/reference/apis/getRest

的“尝试”部分猜测名称 "youtube" 和 "v3" 找到的

有一个 "meta" 发现 API 列出了 API 并包含指向其各自发现文档的链接:https://developers.google.com/apis-explorer/#search/discovery/discovery/v1/discovery.apis.list