Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Get playlist links? #4

Open
Melonadev opened this issue Sep 23, 2021 · 1 comment
Open

Feature request: Get playlist links? #4

Melonadev opened this issue Sep 23, 2021 · 1 comment

Comments

@Melonadev
Copy link

Melonadev commented Sep 23, 2021

There is already a playlist_id parameter in scrapetube.get_playlist, which gets videos in a playlist:

image

What if I want to get all the playlists from a specific channel, just like I can already get its videos?

@dermasmid
Copy link
Owner

i will consider adding this feature in the future, but for now you can do something like this:

from scrapetube.scrapetube import get_videos

playlists = get_videos(
    'https://www.youtube.com/c/Cmaj7/playlists',
    'https://www.youtube.com/youtubei/v1/browse',
    'gridPlaylistRenderer',
    None,
    1
)

for playlist in playlists:
    print(playlist['playlistId'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants