Created
          February 15, 2025 15:42 
        
      - 
      
 - 
        
Save dnicolson/521e67deb823e2954ee09ecc21a457da to your computer and use it in GitHub Desktop.  
Revisions
- 
        
dnicolson created this gist
Feb 15, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ const playlistId = ''; let playlist = await youtube.getPlaylist(playlistId); let videos = playlist.items; while (playlist.has_continuation) { playlist = await playlist.getContinuation(); videos = videos.concat(playlist.items); } for (const video of videos) { const videoInfo = await youtube.getInfo(video.id); if (videoInfo.basic_info.is_liked) { console.log(`Video already liked: ${videoInfo.basic_info.title}`); } else { console.log(`Liking video: ${videoInfo.basic_info.title}`); await videoInfo.like(); } }