Giter Club home page Giter Club logo

apple2spotify's Introduction

Apple2Spotify

This is a VERY rough script and set of instructions for "copying" a playlist from Apple Music to Spotify without requiring an Apple Developer account.

Uses spotify.py: https://github.com/mental32/spotify.py

USE AT YOUR OWN RISK. I TAKE ZERO RESPONSIBILITY FOR YOU MESSING UP YOUR PLAYLISTS!

Setup

Spotify Developer Stuff

1. Create a new application in the Spotify developer dashboard

It's located at https://developer.spotify.com/dashboard/applications

Call the application whatever you want.

2. Add a local callback URL

Go to "Edit Settings" for the new application and add http://127.0.0.1:54321 as a Redirect URI.

  • The script runs a webserver temporarily to receive the callback and gets a user authentication token
  • You can change the port if you want but make sure you change SPOTIFY_REDIRECT_URI in the script to match.

3. Add Spotify users that can access your application

Go to "Users and Access" and add whatever Spotify account(s) you want to create playlists on.

4. Edit the script with your Client ID and Secret

Replace SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET in the script with the ID and Secret from the application overview screen

Python

pip3 install -r requirements.txt

Note that this will grab the "latest" spotify.py which is currently considered to be abandoned so it may disappear at some point.

Usage

The Apple Music playlist you want to copy must be public. You can get the URL for it through the "Share" option in Music/iTunes.

Playlist URLs will look something like this: https://music.apple.com/<country code>/playlist/<name>/<some identifier>

  1. Run the script as follows:
    • python apple2spotify.py <Apple Music playlist URL>
  2. The script grabs the playlist contents from Apple Music and prints it
  3. The script prints a Spotify URL for you to use to authorize the application
  4. After authorizing the application, your web browser will send a request to the local webserver with the authorization token
  5. Once you see the incoming request (which should be printed on the screen), press enter (maybe twice?) to actually create the playlist on Spotify

Bugs?

Probably. Send a PR or open an issue and make sure you include the Apple Music playlist you're trying to copy. I make no promises that I will fix anything.

I have tried to handle cases that show up frequently in electronic music such as artist features and remixes, but I did it in a really lazy way and it'll likely break on some stuff.

License

It's a script and a set of instructions, do what you want with it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.