How can I see all the comments with the Youtube API?

依然范特西╮ 提交于 2020-01-06 13:22:06

问题


I have a problem in Youtube API Comments.

When i access http://gdata.youtube.com/feeds/api/videos/-12_0ZP2p4g/comments , he not show all comments in the video...

This is a problem for me, cause i need ALL information and comments.

When i access the video ( https://www.youtube.com/watch?v=-12_0ZP2p4g ), i found comments that are not on API.

Anybody know why this happens?

Tnks ...


回答1:


It looks like you are currently using the 2.0 API, this API is deprecated now.

Anyway, to achieve what you want - with the 2.0 API - you have to implement some sort of pagination to move through the results.

If you parse what is returned you will get come across a <link> tag with rel='next' it's recommend that you use that link (the href attribute) to avoid pagination problems.

For more information check out : https://developers.google.com/youtube/2.0/reference?csw=1#Paging_through_Results



来源:https://stackoverflow.com/questions/23552101/how-can-i-see-all-the-comments-with-the-youtube-api

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