Page 1 of 1

YouTubeBulkPlaylist

Posted: Fri Feb 19, 2021 12:13 pm
by 3ICE
I created YouTubeBulkPlaylist and used it to move 200+ bookmarked videos into a "watch-later" kind of playlist programmatically. Code snippets from:
src\main\java\YouTubeBulkPlaylist\YouTubeBulkPlaylist.java
* @contributor: Daniel "3ICE" Berezvai
[...]
System.out.println("Init success! Now running 3ICE's code.");
// Create a new, private playlist in the authorized user's channel.
String p1=insertPlaylist("yt");
// If a valid playlist was created, add a bunch of videos to that playlist.
for(String v : new String[]{
//<editor-fold defaultstate="collapsed" desc="100+ more video IDs">
//</editor-fold>
System.out.println(i+" Adding "+v);
try{
insertPlaylistItem(p1, v);
}catch(Exception e){
System.err.println("Skip: "+v+" "+e);
}}
//<editor-fold defaultstate="collapsed" desc="200+ more video IDs">
}catch(IOException e){
System.err.println(e.getMessage());
}catch(Throwable t){
System.err.println(t);
System.exit(0);