如果我能收到任何带字幕的 YouTube 视频的字幕,你能帮帮我吗? 而且,如果是,我该怎么做?
我正在使用此请求获取字幕 ID - https://www.googleapis.com/youtube/v3/captions?part=id,snippet&videoId=id.
在此之后,我发送了这个请求https://www.googleapis.com/youtube/v3/captions/captionId
我添加了下一个范围: 'https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/youtubepartner' .
但是结果收到了403错误:
{
"error": {
"code": 403,
"message": "The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.",
"errors": [
{
"message": "The permissions associated with the request are not sufficient to download the caption track. The request might not be properly authorized, or the video order might not have enabled third-party contributions for this caption.",
"domain": "youtube.caption",
"reason": "forbidden",
"location": "id",
"locationType": "parameter"
}
]
}
}