YouTube Private/Unlisted Videos By Channel ID [closed]

牧云@^-^@ 提交于 2020-12-26 21:39:40

问题


I am trying to get the list of the videos for a specific channel by specifying the channel ID. I used the search but it worked only for public videos. I need to get this list (especially of unlisted videos) either by HTTP requests, or the SDK (NuGet package in C#) preferably. Please note that these unlisted videos may not be in a playlist, so I need a generic solution solely based on channel ID if it exists. Also, I am authenticating as a user who owns/posted those unlisted videos, if that'll make any difference.


回答1:


Please note that without proper authorization, one cannot list non-public video meta-data.

For to list a given channel's video meta-data, you may employ the PlaylistItems.list API endpoint queried with the parameter playlistId set to the ID of that channel's uploads playlist.

This latter ID may very easily be obtained by invoking the Channels.list endpoint queried with the parameter id set to your channel's ID or, otherwise, by passing on the parameter mine as mine=true.

The uploads playlist ID is then to be found within the endpoint's JSON response as value of the property items[0].contentDetails.relatedPlaylists.uploads. Note that for a given channel, you need to obtain the uploads playlist ID only once, then use it as many times as you wish.

Usually, a channel ID and its corresponding uploads playlist ID are related by s/^UC([0-9a-zA-Z_-]{22})$/UU\1/.



来源:https://stackoverflow.com/questions/63810943/youtube-private-unlisted-videos-by-channel-id

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