获取有关YouTube视频的信息

问题描述:

我希望获得YouTube视频的标题和持续时间,并将其显示在我的应用中。我想动态地这样做,因为会有几个视频,它们会改变。我找了一个提供此信息的URL,但我没有运气。有没有人知道这样做的方法?

I'm looking to get the title and duration of a YouTube video and display it within my app. I want to do this dynamically since there will be several videos and they will change. I've looked for a URL that provides this information, but I've had no luck. Does anyone know a way to do this?

您需要使用Youtube API,详细说明如何执行此操作单个视频在这里:

You need to use the Youtube API, details on how to do this for a single video are here:

https:/ /developers.google.com/youtube/2.0/developers_guide_protocol_video_entries

以下是获取星期五API数据的网址:

Here's the URL to get the API data for Friday:

https://gdata.youtube.com/ feeds / api / videos / kfVsfOSbJY0?v = 2