问题
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