I have try the Youtube data API for the Videos
and LiveChatMessages
endpoints, but I found that the liveBroadcastContent
is get a none
value for every old live stream Videos
call, which is required for the LiveChatMessages
call. Anyone know how to achieve that?
Ref. API page: https://developers.google.com/youtube/v3/docs/videos/list https://developers.google.com/youtube/v3/live/docs/liveChatMessages/list
One more time YouTube Data API v3 doesn't provide such a basic feature.
However I recommend you to try out my open-source YouTube operational API. Indeed by requesting https://yt.lemnoslife.com/liveChats?part=snippet&id=VIDEO_ID&time=0 you will get the first live stream chat messages. Especially may interest you:
item["message"]["runs"][0]["text"]
(example: Hello
)item["authorExternalChannelId"]
(example: UCwXmFws4KX57nLQ1Wivf1uQ
)item["timestampText"]["simpleText"]
(example: 3:41:39
)item["timestampUsec"]
(example: 1620493869868368
)Then to get the following live stream chat messages, just pass as time
in the above URL the last chat message retrieved in milliseconds.