Grabbing the current viewer count for youtube live streams

℡╲_俬逩灬. 提交于 2019-12-01 12:59:43

问题


I am looking to source the current stream viewers from the Youtube API v2 for live streams. This information seems to be available on Youtube live streams ("102 Watching Now") both on the main page and after you click on a stream to view.

http://www.youtube.com/watch?v=oNfdKebcrOI&feature=lb

Just below the video on the right. For the time being I am using:

https://gdata.youtube.com/feeds/api/charts/live/events/live_now?v=2&alt=json&inline=true&max-results=20&start-index=1

And I do not see anything vaguely similar to what I need. Is there something I need to add to the query string to get this info?


回答1:


Unfortunately, while that data is available in a backend that the YouTube web interface can access, it's not exposed at all via any API (YT Data API v1/v2/v3 or YT Analytics API) at this time.




回答2:


You can get the current user count via

https://www.youtube.com/live_stats?v={videoid}


来源:https://stackoverflow.com/questions/12961137/grabbing-the-current-viewer-count-for-youtube-live-streams

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