【问题标题】:Where can I find the 'youtube-v3-api-captions.json' discovery document?在哪里可以找到“youtube-v3-api-captions.json”发现文档?
【发布时间】:2015-06-28 01:01:46
【问题描述】:

我正在尝试使用 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 文件完全不清楚。

在哪里可以找到?

【问题讨论】:

    标签: youtube youtube-api youtube-data-api


    【解决方案1】:

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

    这是通过猜测https://developers.google.com/discovery/v1/reference/apis/getRest 的 Try It 部分中的名称“youtube”和“v3”找到的

    【讨论】:

      【解决方案2】:

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

      【讨论】:

      • 不清楚如何从该链接获取请求的 JSON 文档。
      猜你喜欢
      • 2016-04-29
      • 1970-01-01
      • 1970-01-01
      • 2023-03-08
      • 2017-11-08
      • 2015-10-16
      • 1970-01-01
      • 2020-05-15
      • 1970-01-01
      相关资源
      最近更新 更多