Skip to content
neuralgitworkPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

scbkup

Save (incremental) snapshots of a SoundCloud playlist, so you never forget what was in them.

This tool does not download playable mp3 files.

Is it for you?

If you have large or old playlists on SoundCloud, you should use this tool. Because unfortunately, on SoundCloud, tracks often disappear without any trace. And without backup you will never remember or even notice.

Features

What it does:

  • Saves the uploader, title, length and link of every song in a playlist or album.
  • Keeps a history: songs that are added later are appended, but songs that vanish from soundcloud stay in the file.
  • Tells you which songs disappeared, and whether they are gone from SoundCloud or only removed from the playlist.

What it does not do:

  • It does not download playable music files. It saves a list with links, not audio.
  • It does not play songs for you. The saved playlists can be viewed in music managers, but the links point to SoundCloud pages, so players like VLC will probably not be able to play them.

This tool is for you, if you spent months building playlists and would be sad to lose the record each gem inside them.

Usage

You give the script a link to a SoundCloud playlist, album or profile. It saves one playlist file per playlist (SoudCloud calls this a "set") into a folder called soundcloud-playlist-backup, right next to the script file.

Then, when your playlist has grown some more, you'll want to run it again to save your progress:

  • New songs are appended to the end of the file.
  • Songs that disappeared stay in the file.
  • The script checks each song that is in your backup but no longer in the playlist, and tells you what happened:
Result Meaning
Gone from SoundCloud The song was deleted or made private. It is also copied into a <user>_<set>.lost-items.m3u8 file.
Removed from the playlist, still on SoundCloud Someone took it out of the playlist, but the song still exists and can be added back.
Same uploader, title and length under another link Probably a renamed song.
Could not check A temporary error. Nothing is reported as lost.

New songs in the playlist on SoundClown are appended to the local .m3u8. Because of that, the backup file is a history of everything the playlist ever contained, not (always) a mirror of its current order. If you want a fresh copy that mirrors the current playlist, rename (or delete) the soundcloud-playlist-backup folder and run the script again. But then you might have lost knowledge about your songs forever.

Which links can I use?

# Link What happens
1 A single playlist or album, e.g. https://soundcloud.com/user/sets/name Backs up that one set. Playlists and albums are both "sets" on SoundCloud and are treated the same.
2 A user's playlists page, e.g. https://soundcloud.com/user/sets Backs up every public playlist of that user, one file per playlist.
3 A user's albums page, e.g. https://soundcloud.com/user/albums Backs up every public album of that user, one file per album.
4 A user profile, e.g. https://soundcloud.com/user Backs up all public playlists and all public albums of that user, one file per set.

Trailing slashes and extra parts such as ?si=... in the link are ignored.

Not supported:

  • Private playlists. ⚠️⚠️⚠️ Only public ones can be read. ⚠️⚠️⚠️
  • Personal links like https://soundcloud.com/you/..., because you means whoever is logged in, which the script cannot know. Use your profile link, such as https://soundcloud.com/your-user-name, instead.
  • Other pages, such as tracks or likes.

Example output

found 3 public sets/albums for someuser
backup folder: /music/soundcloud-playlist-backup
[1/3] someuser_summer-mix: 41 online, 2 new
    GONE from SoundCloud (deleted or private): Some Artist - Some Song  https://soundcloud.com/some-artist/some-song
[2/3] someuser_favorites: 120 online (created)
[3/3] someuser_old-stuff: 87 online, 0 new
    removed from playlist, still on SoundCloud: Another Artist - Another Song  https://soundcloud.com/another-artist/another-song
done: 3 complete, 0 with problems

Playlist files

The files that the tool outputs are standard .m3u8 playlists (UTF-8 M3U), a format many music managers and players can import or display. Most of them will show the playlist contents in their libraries.

Despite the nice format, VLC probably cannot play the songs. The entries link to SoundCloud pages, not to audio files. You can still open the playlists in VLC, MusicBee and similar tools to view them, and use them for your backups and records.

Each set becomes one file named after the user and the set, both taken from the SoundCloud link, not from the display title:

soundcloud-playlist-backup/<user>_<set>.m3u8
soundcloud-playlist-backup/<user>_<set>.lost-items.m3u8

For example, https://soundcloud.com/skrillex/sets/recess becomes skrillex_recess.m3u8. The lost-items file only appears once a song has been found to be gone.

Inside a file, each song has two lines. For example look at this resulting .m3u8 that stems from a SoundCloud playlist that had only one song:

#EXTM3U
#EXTINF:42,Explorers of the Internet - Super Phonk World
https://soundcloud.com/explorersoftheinternet/super-phonk-world

The very first line (that says #EXTM3U) is required in any .m3u8 file. Keep it there, but otherwise you can ignore it. It only means something to the computer programs that open the file, but not to us humans.

The next two lines belong to the song that actually was in the playlist on SoundCloud:

  1. The first of them is a comment with the length in seconds, the uploader and the title.
  2. The second of them is the song link as it originally is (or was) on SoundCloud.

On the first backup you make, songs are written in the same order as in the SoundCloud playlist.

Installation

The backup software is a single text file called scbkup.py. You can download it from this page (open the file, then use "Download raw file" or the download icon) and put it inside a folder where you want your backups to live, for example Music/playlists.

The script needs Python 3, a free program that runs Python scripts. Apart from Python 3 and this script (scbkup.py) you need nothing else.

The installation principle is always the same, no matter what computer or operating system you use:

  1. Check whether Python 3 is installed.
  2. If not, install Python 3.
  3. Open a terminal in the folder where you saved scbkup.py (or equivalently open the terminal first and then navigate to that folder).
  4. Run the script with a SoundCloud link.

The next two sections show how to do this both on Windows and on Linux. If anything looks different on your computer, or you see a message you do not understand, copy those texts and ask an AI assistant what it means.

Installation on Windows

  1. Check whether Python is installed:
    1. Open the Command Prompt (you can press the Windows key, type cmd, and then press Enter). A window should open.
    2. Inside that window type the following text and press Enter:
      py --version
      
    3. If that gives an error, try:
      python --version
      
    4. You will probably see one of these results:
      • Python 3. followed by numbers: Python is installed. Go to step 3.
      • The Microsoft Store opens, or an error such as "not recognized": Python is not installed. Go to step 2.1
      • Something else: copy it and ask an AI assistant.
  2. Install Python (skip if previous check was successful):
    1. You can install Python from the Microsoft Store.
      1. Open the store, search for python and install it.
      2. If it does not work, try the next step instead.
    2. Manual Python installation (if installation via Store didnt work):
      1. Go to https://www.python.org/downloads/, download the installer and run it.
      2. On the first screen of the installation window, tick "Add python.exe to PATH" before clicking "Install Now".
      3. Close the Command Prompt, open a new one, and repeat the check if python is there (step 1).
  3. In the Command Prompt, go to the folder where you saved scbkup.py. The easiest way: open that folder in File Explorer, click the address bar at the top, type cmd and press Enter. A Command Prompt opens in that folder.
  4. Run the script:
    • Replace the example link with the link you want, and try to keep the quotation marks:
       py scbkup.py "https://soundcloud.com/some-user-name"
      
    • If py does not work, use python instead:
      python scbkup.py "https://soundcloud.com/some-user-name"
      

Installation on Linux

  1. Open a terminal. We will assume Ubuntu or Debian here. If that's not your operating system, ask AI for help.
    1. Check whether Python 3 is installed:
      python3 --version
      
    2. You will probably see Python 3.XX where XX are some unimportant numbers. If you see "command not found", simply install it with the next step.
  2. Install python3 (skip if previous check was successful):
    1. Install python3 with the following command (you will need to type in your password to confirm the installation):
      sudo apt install python3
      
  3. Inside the terminal, go to the folder where you saved scbkup.py. Most file managers have "Open in Terminal" when you right-click an empty space in the folder. Alternatively, type cd with a space, drag the folder into the terminal, and press Enter.
  4. Run the script, but before you do, replace the example link with the one you want, and try to keep the quotation marks:
    python3 scbkup.py "https://soundcloud.com/some-user-name"
    

Using this script

Run the script again whenever you want to update your backups, using the same link as before. The script has to wait a little between requests, so backing up many playlists (or a very large playlist) can take a while.

When it prints a line starting with done:, it is finished. Your playlists are in soundcloud-playlist-backup, next to the script. To update later, keep the script where it is and run the same command again. If you only wanted a one-off backup, you can delete the script afterwards.

Feel free to read what the program wrote in the terminal. It can be very insightful. When you are done reading you can close the terminal.

Troubleshooting

Problem What to do
"not recognized" or "command not found" when running the script Python is missing or not set up. Go back to the installation section for your system.
The Microsoft Store opens Python is not installed. Go back to the Windows installation section.
"can't open file ... No such file or directory" The terminal is not in the folder that contains scbkup.py. Redo step 3 of your system's installation section.
error: user page not available (HTTP 404) The link is misspelled, or the user does not exist.
error: unsupported link shape The link points to tracks, likes or another page. Use one of the links in the table above.
error: 'you' means the logged-in viewer ... Replace you in the link with your actual SoundCloud user name.
FAILED ... HTTP Error 429 SoundCloud is limiting requests. Wait a while and run the same command again. This is safe, because nothing is ever removed from your backups.
It seems slow That is normal for users with many playlists. The script waits a little between requests.

Good to know

  • If some songs of a set cannot be resolved, the rest is still saved, the problem is printed, and the check for lost songs is skipped for that run. Those songs are retried on the next run. If a set had problems, the script exits with code 1 (programmers can use this in automation; you can ignore it).
  • The "gone" check asks SoundCloud whether a song page still exists. Only a clear "not found" answer counts as gone; any other error is reported as "could not check".
  • A song whose link was renamed shows up twice in the backup, under the old and the new link. This is harmless; nothing is lost.
  • It reads data the same way the SoundCloud website does, through an unofficial interface. SoundCloud can change this at any time, which may break the script.
  • The number of playlists SoundCloud shows on your own profile can differ from the number of sets the script finds. This happens when you have private playlists. The script can only gather public information.
  • Despite ending with .py, the script is a plain text file. You can open it in a text editor and read exactly what it does.

Warranty

I tested the tool many times, but I still can't guarantee for anything. Use at your own risk! This tool comes without warranty for anything.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages