没有办法直接在 YouTube 上执行此操作,所以我想知道是否有办法通过 API 执行此操作?在网站上,您可以只过滤带字幕的视频,但如果您想搜索带法语字幕的视频,则不能。
非常感谢。
最佳答案
这似乎是不可能的:
caption The caption parameter enables you to restrict a search to videos that have or do not have caption tracks: To only request videos that have captions, set the caption parameter value to true. For example, the URL below would retrieve videos that have captions and that match the search term "surfing":
https://gdata.youtube.com/feeds/api/videos?q=surfing&caption&v=2 Note: For backward-compatibility reasons, the API will also only return videos that have captions if you include the caption parameter but do not specify a parameter value.
To only request videos that do not have captions, set the caption parameter value to false. For example, the URL below would retrieve videos that do not have captions and that match the search term "surfing":
https://gdata.youtube.com/feeds/api/videos?q=surfing&caption=false&v=2 Note: The API will return an HTTP 400 response if you specify the parameter with any value other than true or false.
来源:https://developers.google.com/youtube/2.0/developers_guide_protocol#captionsp
关于search - 是否可以按字幕语言搜索 YouTube 视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15590359/