Open rebelfish opened 3 weeks ago
Thank you for contributing to PyTube. Please remember to reference Contributing.md
I've done something like this, at least getting the Playlist IDs (name and other metadata can then be recovered with a playlist object)... this was my approach, starting with the playlists_html attribute of the playlist's parent channel object:
PLAYLISTS_RE = re.compile(r'playlist\?list=([^\s\"]+)"')
def getPlaylistsFromChannel(channelObj):
return PLAYLISTS_RE.findall(channelObj.playlists_html)
Is your feature request related to a problem? Please describe. I have a feature request to easily capture a list of all playlists titles and URLs on a playlist page
Describe the solution you'd like Just as we can use Playlist to point to a specific playlist url and capture a list of the URLs in the Playlist, I would like to capture a list of Playlists from the channel.playlists_url as an object. from that object, I could cycle through each of the Playlist URLs to capture all metadata associated with the Playlist object. i.e. get the title of the playlist, author, description and list of URLs in the playlist.
The Channel object can find the playlists_url but I can't find a way to cycle through the playlists/videos on that page.