且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 *** Data API v3 获取直播小 URL

更新时间:2023-02-21 07:41:16

***'s shortened URL associated to a given video -- identified by its ID VIDEO_ID -- is of form:

https://youtu.be/VIDEO_ID,

where (usually, though not officially documented as such) VIDEO_ID obeys to the following regex pattern:

^[0-9a-zA-Z_-]{11}$.

In the case of live streaming, for to be able to share the shortened URL of one such stream you've created, you should obtain the video ID associated to that stream.

That video ID is to be found as the value of the property id of the LiveBroadcasts resource that is bound to your live stream.