문제

I am browsing the YouTube API here: https://developers.google.com/youtube/v3/guides/working_with_channel_ids

And I don't quite see a way to get all of a channel's videos. Is that not a common thing people do? And you need the channel id which I am not sure how to get. It is not my channel.

Would anyone please be able to point me in the right direction here. It seems that if I can embed a video into a website, I should be able to get the full channel list of videos. Or am I missing something?

도움이 되었습니까?

해결책

You can do this to retrieve the channel id:

Retrieve Youtube Channel info for "Vanity" channel

And later, with channel id you can retrieve the channel's playlists:

https://developers.google.com/youtube/v3/docs/playlists

And then you can use each playlist id to retrieve the PlayListItems, and in this way retrieve all the videoIds in the channel:

https://developers.google.com/youtube/v3/docs/playlistItems

다른 팁

Refer to this page from google to see example how to get uploaded video of specified channel:

  1. It retrieves the playlist ID for videos uploaded to the user's channel using the API's channels.list method.
  2. It passes that ID to the playlistItems.list method to retrieve the videos in that list.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top