从 youtube 数据 API 中提取一段数据
我需要从 Youtube Data API(带参数)中提取一小段数据,但我只看到的是,我必须解析所有数据才能获取它......
让我们看看我需要的示例:
URL = http://gdata.youtube.com/feeds/api/videos/2ILsMmZG4VM
http://gdata.youtube.com/feeds/api/videos/2ILsMmZG4VM2007-06-03T12:41:05.000Z2011-08-03T08:29:25.000Z比黑色开口高清更暗:编辑: 第一个《比黑之黑》开场。我很久以前就上传了这个,并没有意识到翻译不好,所以请不要沮丧,只是享受音乐/动画。如果翻译确实让您感到困扰,请观看不同的视频。说真的,伙计们...JuN0http://gdata.youtube.com/feeds/api/users/jun0Film:编辑: 第一个《比黑之黑》开场。我很久以前就上传了这个,并没有意识到翻译不好,所以请不要沮丧,只是享受音乐/动画。如果翻译确实让您感到困扰,请观看不同的视频。说真的,伙计们……更黑,然后,黑色
更深入的是,我可以看到我需要的部分,即 RTSP 链接:
...media:content url='rtsp://v7.cache8.c.youtube.com/CiILENy73wIaGQlT4UZmMuyC2BMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' media='video'表达式='完整' 持续时间='101' yt:format='6'/
那么我需要知道的是存在参数放在链接中以直接提取 URL,而不必解析所有 XML。
谢谢大家,请原谅我糟糕的英语。
解决方案:
谢谢谢里夫,我已经找到了(给你 1 分)
http://gdata.youtube.com/feeds/api/videos?q="2ILsMmZG4VM"&fields=entry(media:group(media:content))
I need to extract little piece of Data from Youtube Data API (with params), but what i have only seen , is that i must parse all data to get it ...
Let's see the example that i need :
URL = http://gdata.youtube.com/feeds/api/videos/2ILsMmZG4VM
http://gdata.youtube.com/feeds/api/videos/2ILsMmZG4VM2007-06-03T12:41:05.000Z2011-08-03T08:29:25.000ZDARKER THAN BLACK OPENING HD:EDIT:
First Darker than Black opening. I uploaded this a long time ago and was NOT aware of the poor translations so please don't be upset and just enjoy the music/animation. If the translations really bother you, then watch a different video. Seriously guys...JuN0http://gdata.youtube.com/feeds/api/users/jun0Film:EDIT:
First Darker than Black opening. I uploaded this a long time ago and was NOT aware of the poor translations so please don't be upset and just enjoy the music/animation. If the translations really bother you, then watch a different video. Seriously guys...darker, then, black
And more deep , i can see the part i need , which is the RTSP link :
...media:content url='rtsp://v7.cache8.c.youtube.com/CiILENy73wIaGQlT4UZmMuyC2BMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='101' yt:format='6'/
Then what i need to know if exist params to put in the link to extract directly the URL , to not have to parse all the XML .
Thanks for all , and forgive my bad english.
SOLUTION:
I have found it thx to Sherif (1 point for you)
http://gdata.youtube.com/feeds/api/videos?q="2ILsMmZG4VM"&fields=entry(media:group(media:content))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
但是fields 参数目前仅用于实验性功能
Try this:
However The fields parameter is currently used for experimental features only