获取YouTube视频的标题与使用jQuery的YouTube API [英] Get youtube video's title with jQuery using youtube api
问题描述
什么是获得来自youtybe视频标题最简单的方法,例如该视频标题:
What is the easiest way to get the title from the youtybe video , for example this video title :
http://www.youtube.com/watch?v=Wp7B81Kx66o
谢谢!
推荐答案
使用 jQuery的JSON 打电话到YouTube的API得到的结果回来,然后使用jQuery把你想让他们的结果。您可以使用Firebug的Net选项卡,以确保您的请求/ respoonses正确回来,然后使用的console.log(),以确保您解析正确的响应。
Use jQuery's JSON call to the YouTube API to get the results back and then use jQuery to put the results where you want them. You can use firebug's NET tab to make sure you requests/respoonses are coming back correctly and then use console.log() to make sure you parsed the response correctly.
如。网址:
GET <一个href=\"https://gdata.youtube.com/feeds/api/videos/(the-video-id)?v=2&alt=json\">https://gdata.youtube.com/feeds/api/videos/(the-video-id)?v=2&alt=json
更多信息:
这篇关于获取YouTube视频的标题与使用jQuery的YouTube API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!