What does this script do?
This script can convert your music playlists between YouTube & Spotify with a single click.
How to use it:
1. Make sure you're signed in to both YouTube and Spotify in your browser.
2. Open the page of the playlist you want to convert.
3. Click the Tampermonkey icon, then under "YouTube/Spotify Playlist Converter" you'll either find "YouTube to Spotify" or "Spotify to YouTube" depending on the playlist currently opened, click it to start the conversion.

4. Once done, you can find the playlist in the opposite service under the same name.
Limitations:
YouTube to Spotify conversion requires that the YouTube playlist be set to either Unlisted or Public (You can turn it back to Private after the conversion is over).
Depending on what the conversion service (Songlink) returns, some songs might convert unexpectedly, for example, a cover song on YouTube could be converted into the original song on Spotify, if said cover song is not available on it.
Disclaimer:
This script uses two third-party APIs, Songlink and Invidious, therefore, some song data is sent to their servers, however, NO account information from your Spotify or YouTube is sent to any third-party if you use this script. (The code is completely visible of course, and can be seen under the "code" section).