As the title says, using the Playlist class to get the video URLs of a playlist will result in 0 videos.
Playlist p = new Playlist("https://www.youtube.com/playlist?list=PLOh2AUhKQzaNeE-vXiH1SMeJyTdRT84dr");
ArrayList<String> videos = p.getVideos();
System.out.println("Found " + videos.size() + " videos:");
videos.forEach(s -> System.out.println(" URL: " + s));
This gives me the output:
Found 0 videos:
I've already tried to figure out what the issue could be, and it seems that YouTube has changed some internal JSON stuff. When running the getJson() method from Playlist, the library expects a richGridRenderer or playlistVideoListRenderer JSON object which contains the videos. Rather, the ItemSelectionRenderer now contains the videos (or now only contains the videos, i don't know anything about the JSON stuff before the library stopped working).
I've tried to adapt the library myself to make it work with the changes Youtube made, but I haven't been able to get more than 200 videos from one playlist since the continuation in the initial getJson() response only gives you an additional 100 videos, without giving you another token to use for another continuation (i.e. the continuation only contains videos).
Maybe you can figure out how to get it working properly again?
Java version used: 21
From build.gradle: implementation 'com.github.felipeucelli:JavaTube:352e15fb24'
As the title says, using the Playlist class to get the video URLs of a playlist will result in 0 videos.
This gives me the output:
Found 0 videos:I've already tried to figure out what the issue could be, and it seems that YouTube has changed some internal JSON stuff. When running the getJson() method from Playlist, the library expects a richGridRenderer or playlistVideoListRenderer JSON object which contains the videos. Rather, the ItemSelectionRenderer now contains the videos (or now only contains the videos, i don't know anything about the JSON stuff before the library stopped working).
I've tried to adapt the library myself to make it work with the changes Youtube made, but I haven't been able to get more than 200 videos from one playlist since the continuation in the initial getJson() response only gives you an additional 100 videos, without giving you another token to use for another continuation (i.e. the continuation only contains videos).
Maybe you can figure out how to get it working properly again?
Java version used: 21
From build.gradle:
implementation 'com.github.felipeucelli:JavaTube:352e15fb24'