.. _channel_playlists: Getting Channel Playlists ============================= **This code takes the ids of the channel's playlists and returns an array containing the playlist objects:**:: from pytubefix import Channel ch = Channel('https://www.youtube.com/@Alanwalkermusic') print(ch.playlists) Output:: [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] With this array you can iterate with each playlist object. **You can get the YouTube objects for each playlist using:**:: ch = Channel('https://www.youtube.com/@Alanwalkermusic') print(ch.playlists[0].videos) Output:: [, , , , , , , , , , , , , , ] **Or you can also get the URL of the videos from each playlist:**:: ch = Channel('https://www.youtube.com/@Alanwalkermusic') print(ch.playlists[0].video_urls) Output:: ['https://www.youtube.com/watch?v=v6oZuqN85D4', 'https://www.youtube.com/watch?v=R-YSFJoQvwA', 'https://www.youtube.com/watch?v=ouEl3qTLc0M', 'https://www.youtube.com/watch?v=tu4HfcmMn1E', 'https://www.youtube.com/watch?v=tw-pNm4oaoY', 'https://www.youtube.com/watch?v=_BFgzaqyd8w', 'https://www.youtube.com/watch?v=IQDJ3nu45Tw', 'https://www.youtube.com/watch?v=RTR0oVn75Zs', 'https://www.youtube.com/watch?v=JQORMjyFhBg', 'https://www.youtube.com/watch?v=5AKDVJq45R4', 'https://www.youtube.com/watch?v=_T9J-NK6ctI', 'https://www.youtube.com/watch?v=d4vtEEL89JA', 'https://www.youtube.com/watch?v=OBYwA36WHiw', 'https://www.youtube.com/watch?v=Epa17C5Fy5c', 'https://www.youtube.com/watch?v=07Z-DojGMAw']