获取有关YouTube视频的信息 [英] Get info about a YouTube video

查看:186
本文介绍了获取有关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

这篇关于获取有关YouTube视频的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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