Description is truncated when searching Youtube API

时光总嘲笑我的痴心妄想 提交于 2021-01-27 13:59:09

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/32717623/description-is-truncated-when-searching-youtube-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!