admin管理员组文章数量:1303191
I am currently using the Javascript API by youtube to display a video on my web page however now I want to also retrieve the youtube description from the video id? How would I go about doing this?
I only want description and title:
ex:
"kind": "youtube#video",
"etag": etag,
"id": string,
"snippet": {
"publishedAt": datetime,
"channelId": string,
"title": string,
"description": string,
"thumbnails": {
(key): {
"url": string,
"width": unsigned integer,
"height": unsigned integer
}
If anyone could post a link or either show me an example of code on how I can acplish this?
I am currently using the Javascript API by youtube to display a video on my web page however now I want to also retrieve the youtube description from the video id? How would I go about doing this?
I only want description and title:
ex:
"kind": "youtube#video",
"etag": etag,
"id": string,
"snippet": {
"publishedAt": datetime,
"channelId": string,
"title": string,
"description": string,
"thumbnails": {
(key): {
"url": string,
"width": unsigned integer,
"height": unsigned integer
}
https://developers.google./youtube/v3/docs/videos
If anyone could post a link or either show me an example of code on how I can acplish this?
Share Improve this question edited May 14, 2015 at 17:49 ChewyMasta asked May 14, 2015 at 15:31 ChewyMastaChewyMasta 732 silver badges9 bronze badges1 Answer
Reset to default 9The developer documentation you linked to has some excellent code examples -- that'll be the best place to start. Use the "list" reference menu for videos.
If you're saying that you just want the title and description without the other fields, you can use the fields parameter in your request ... something like this:
https://www.googleapis./youtube/v3/videos?part=snippet&id={VIDEO_ID}&fields=items/snippet/title,items/snippet/description&key={YOUR_API_KEY}
本文标签: javascriptHow to get youtube video description with video idStack Overflow
版权声明:本文标题:javascript - How to get youtube video description with video id? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741719791a2394323.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论