Last active
          September 10, 2025 07:07 
        
      - 
      
 - 
        
Save shiftgeist/b96190f0af72d45e05489b8131f42106 to your computer and use it in GitHub Desktop.  
    Soundcloud: Add all liked songs to playlist
  
        
  
    
      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 characters
    
  
  
    
  | // 1. Start on https://soundcloud.com/you/likes | |
| // 2. Scroll all the way to the bottom (may only add 300 items at a time because of soundcloud api) | |
| // (playlists are limited to 500 songs) | |
| playlistName = 'Likes' // <== your playlist | |
| list = Array.from(document.querySelectorAll('.badgeList__item .sc-button-more')) | |
| console.log('Found', list.length, 'liked songs') | |
| function addToPlaylist(item) { | |
| // open menu | |
| item.click() | |
| document.querySelector('.sc-button-addtoset').click() | |
| setTimeout(() => { | |
| playlists = Array.from(document.querySelectorAll('.addToPlaylistItem')) | |
| playlist = playlists.find(p => { | |
| titleLink = p.querySelector('.addToPlaylistItem__titleLink').innerText | |
| return titleLink.toLowerCase() === playlistName.toLowerCase() | |
| }) | |
| if (!playlist) { | |
| console.error('No playlist with name', playlistName) | |
| } | |
| // click add to playlist after animation | |
| button = playlist.querySelector('.addToPlaylistButton') | |
| if (button.innerText.toLowerCase() === 'added') { | |
| console.warn('Song already in playlist') | |
| } else { | |
| console.info('Song added to playlist') | |
| button.click() | |
| } | |
| document.querySelector('.modal').click() | |
| }, 300) | |
| } | |
| function delay(i) { | |
| addToPlaylist(list[i]) | |
| if (i < list.length) { | |
| setTimeout(() => { | |
| i++; | |
| delay(i); | |
| }, 500); | |
| } else { | |
| console.warn('End of list reached', i) | |
| } | |
| } | |
| delay(0) | 
How can I shorten down the list of tracks the program is looking through? Ive gotten a bunch of tracks now but it keeps timing out by the time I need to finish the rest.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
how do i use this