首页 > youtube > 如何从URL检索有关YouTube视频作者的信息

如何从URL检索有关YouTube视频作者的信息 (How to retrieve information on author of a youtube video from URL)

2014-05-23 youtube

问题

我们在组织中对youtube的访问权限有限(默认情况下禁止使用youtube,只有几个marcoms有例外)。但是,我们希望员工能够观看由我们的官方YouTube帐户发布的视频,并限制其余部分。有什么方法可以过滤URL中的视频作者,以便我们可以向公司过滤器添加例外吗?

解决方法

更深入地了解提供的Fares链接,如果您可以使用GET请求并解析JSON,则可以使用API​​:

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

或者更具体地说:

https://developers.google.com/youtube/2.0/developers_guide_protocol_video_entries?csw=1

例如,此视频的json 是:https//gdata.youtube.com/feeds/api/videos/hqKafI7Amd8?v = 2 & alt = json-in- script包含作者的片段:

"author":[{"name":{"$t":"TEDx Talks"},"uri":"$t":"https://gdata.youtube.com/feeds/api/users/TEDxTalks"},"yt$userId":{"$t":"sT0YIqwnpJCM-mx7-gSA4Q"}}]

或者,xml在此网址:https//gdata.youtube.com/feeds/api/videos/hqKafI7Amd8?v = 2

但是,v2 api已被折旧,因此这可能不会永远有效

问题

We have a limited access to youtube in our organisation (it is banned by default, only several marcoms guys have exception). However, we would like employees to be able to watch the videos that have been posted by our official youtube account and keep the rest restricted. Is there any way how to filter the author of a video from URL so that we can add an exception to our company filter?

解决方法

Going a bit deeper into the link Fares provided, if you can use a GET request and parse JSON, you can use the API:

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

or more specifically:

https://developers.google.com/youtube/2.0/developers_guide_protocol_video_entries?csw=1

for example, the json for this video is : https://gdata.youtube.com/feeds/api/videos/hqKafI7Amd8?v=2&alt=json-in-script snippet containing author:

"author":[{"name":{"$t":"TEDx Talks"},"uri":"$t":"https://gdata.youtube.com/feeds/api/users/TEDxTalks"},"yt$userId":{"$t":"sT0YIqwnpJCM-mx7-gSA4Q"}}]

or, the xml is at this url: https://gdata.youtube.com/feeds/api/videos/hqKafI7Amd8?v=2

however, the v2 api has been depreciated, so this might not work forever

相似信息