搜索 Youtube API 时描述被截断 [英] Description is truncated when searching Youtube API

查看:38
本文介绍了搜索 Youtube API 时描述被截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么 Youtube API 搜索返回视频的截断描述?这是我用来搜索视频的网址:

Why Youtube API search returns truncated description for video? Here is URL I am using to search videos:

https://www.googleapis.com/youtube/v3/search?type=video&part=snippet&safesearch=strict&restriction=US&key=%@&q=%@&pageToken=%@

如何在搜索后获得视频的完整描述?

How can I get full description for videos after search?

推荐答案

调用搜索服务时,描述被截断为 150-160 个字符.正如您在 youtube.com 中进行搜索时所看到的,在结果列表中,评论会被截断,但是当您搜索时到视频页面,您可以看到完整的说明.与api的原理相同.您需要获取视频 ID,并使用它来调用 视频.list 服务,以获取有关特定视频的信息.

The descriptions are truncated to 150-160 characters when calling the search service. As you can see when you make a search in youtube.com, in the result list, comments are truncated, but when you go to the video page you can see the full description. It's the same principle with the api. You need to get the video id, and use it to call the videos.list service, to get the information regarding the specific video.

这篇关于搜索 Youtube API 时描述被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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