Google Video 不再能够检索字幕? [英] Google Video no longer able to retrieve captions?

查看:22
本文介绍了Google Video 不再能够检索字幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

截至 4 天前,您可以向 https://video.google.com/timedtext?lang=en&v={youtubeVideoId} 并接收包含给定 YouTube 视频字幕轨道的 xml 响应.有谁知道此支持是否已被删除,因为从今晚开始,它不再提供带有字幕的 xml 响应,每个视频的页面都是空的.有许多视频在 4 天前有效,但不再有效.提前致谢

As of 4 days ago, you were able to send a GET request to or visit https://video.google.com/timedtext?lang=en&v={youtubeVideoId} and receive an xml response containing the caption track of a given youtube video. Does anyone know if this support has been removed, because as of tonight, it no longer provides the xml response with the captions, the page is simply empty for every video. There were numerous videos this worked for 4 days ago that no longer work. Thanks in advance

推荐答案

我建议任何使用 python 的人尝试 youtube_transcript_api 模块.我曾经向 https://video.google 发送 GET 请求.com/timedtext?lang=en&v={videoId},但现在页面是空白的.下面是代码示例.另外这个方法不需要api key.

I recommend that anyone who uses python to try the module youtube_transcript_api. I used to send GET request to https://video.google.com/timedtext?lang=en&v={videoId}, but now the page is blank. The following is the code example. In addition, this method does not need api key.

from youtube_transcript_api import YouTubeTranscriptApi
srt = YouTubeTranscriptApi.get_transcript("videoId",languages=['en'])

这篇关于Google Video 不再能够检索字幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆