sealedtx / java-youtube-downloader

Simple, almost zero-dependency java parser for retrieving youtube video metadata
Other
413 stars 115 forks source link

Playlist detail problem #124

Open patrykos125 opened 9 months ago

patrykos125 commented 9 months ago

Hey for the beginning great library. I can't get playlist details. I got downloader.model.playlist.PlaylistInfo.details()" because "playlistInfo" is null. Can you check this?

sealedtx commented 9 months ago

@patrykos125 works fine for me. Please provide details: library version, playlist id, code snippet to reproduce

patrykos125 commented 9 months ago

I use current version from main branch. Downloading single video by videoid work great but this not work. `
YoutubeDownloader downloader = new YoutubeDownloader();

    String playlistId = "RDrNg2Dh6gPkw"; // for url https://www.youtube.com/playlist?list=abc12345
    RequestPlaylistInfo request = new RequestPlaylistInfo(playlistId);
    Response<PlaylistInfo> response = downloader.getPlaylistInfo(request);
    PlaylistInfo playlistInfo = response.data();

// playlist details PlaylistDetails details = playlistInfo.details(); System.out.println(details.title()); System.out.println(details.videoCount());

// get video details PlaylistVideoDetails videoDetails = playlistInfo.videos().get(0); System.out.println(videoDetails.videoId()); System.out.println(videoDetails.title()); System.out.println(videoDetails.index());`

Did i forget somethings?

sealedtx commented 9 months ago

There is error message for your playlist id:

This playlist type is unviewable.

Try it https://www.youtube.com/playlist?list=RDrNg2Dh6gPkw

I have no idea why, you can try and investigate the reason