如何使用 Youtube API 查看所有评论?

问题描述:

我在 Youtube API 评论中遇到问题.

I have a problem in Youtube API Comments.

当我访问 http://gdata.youtube.com/feeds/api/videos/-12_0ZP2p4g/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.

当我访问视频时 ( https://www.youtube.com/watch?v=-12_0ZP2p4g ),我发现了不在 API 上的评论.

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 ...

您目前使用的是 2.0 API,此 API 现已弃用.

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

无论如何,要实现您想要的 - 使用 2.0 API - 您必须实现某种分页以浏览结果.

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

如果您解析返回的内容,您将遇到带有 rel='next'<link> 标记,建议您使用该链接(href 属性)以避免分页问题.

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.

有关更多信息,请查看:https://developers.google.com/youtube/2.0/reference?csw=1#Paging_through_Results

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