我正在尝试使用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
文件的位置。
哪里可以找到?
答案 0 :(得分:10)
似乎在这里:https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest
通过在https://developers.google.com/discovery/v1/reference/apis/getRest的“试用”部分猜测名称“youtube”和“v3”找到了哪个
答案 1 :(得分:0)
有一个“元”发现API,列出了API,并包含指向各自发现文档的链接:https://developers.google.com/apis-explorer/#search/discovery/discovery/v1/discovery.apis.list