How to get comments through Youtube Data API v3 / JSOUP parsing? [duplicate]

天大地大妈咪最大 提交于 2019-12-06 05:40:22

Update: Comments feature is now available in Data API v3. http://youtube-eng.blogspot.com/2015/04/manage-comments-with-youtube-data-api-v3.html

Comments feature for the v3 API will hopefully be released on early Q1. You can track the issue and ask for the trusted tester, so you can already start developing against.

https://code.google.com/p/gdata-issues/issues/detail?id=5046

tim687

I don't know if this may help a bit, but there is a little code example page from Google to use their Youtube API: YouTube Data API (v3) Code Samples

The samples are available at github as you can see at the page.

I don't think it really think JSOUP is an option. If you have a video (let's take PewDiePie for example) it has litterly thousands of comments (maybe more), and not all the comments are displayed when you open the video, so you'll first need to find a way to load all comments before you can start reading them. The reading part is the most difficult, because it has thousands of comments, the system takes a while to read the comments and do whatever you want to do with it.

But what I did find is this: How to get comments of youtube Video from VideoId android in youtubeApi v3?

Take a look at the link in the comment on the first post and compare it to the video itself:

With this link you get the comments using JSON:

Getting comments of a video: http://gdata.youtube.com/feeds/api/videos/DBNYwxDZ_pA/comments?orderby=published&alt=json&max-results=30&start-index=1

The video itself: https://www.youtube.com/watch?v=DBNYwxDZ_pA

I hope this helps you a bit with your project!

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