Giter Site home page Giter Site logo

ed789d0 / spotifyidstoapplemusic Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 9 KB

This script takes in a Spotify URI for a track from a variable, looks up the track's info from the Spotify API, then searches for it on Apple Music using the iTunes Search API. It then opens that track in the Mac's Music app.

Python 100.00%
apple-music itunes-search-api python spotify spotify-api spotify-uri spotify-web-api spotipy

spotifyidstoapplemusic's Introduction

SpotifyIdsToAppleMusic

This script takes in a Spotify URI for a track from a variable, looks up the track's info from the Spotify API, then searches for it on Apple Music using the iTunes Search API. It then opens that track in the Mac's Music app.

How to Use

  1. Git clone this repo or download the ZIP
  2. Run pip install -r requirements.txt in the same folder as this code (or just install the modules in requirements.txt manually)
  3. Create a tokens.toml file and add this in there:
client_id="123my456clientid789"
client_secret="123my456secret789"

replacing the stuff in the quotes with your Spotify API credentials. (No credentials are needed for the iTunes Search API.)

  1. Change the Spotify URI in the variable at the top of the Python file.

  2. Run the Python file.

Check all matches before using them

This script is really basic, and it has no way of knowing if the track found on Apple Music is the same as the Spotify track. Ideally, it would check stuff like the music's duration and explicitness between the two to make sure it's the same song (but track names sometimes differ between the two services despite being the same song).

spotifyidstoapplemusic's People

Contributors

dependabot[bot] avatar ed789d0 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sourcery-ai-bot

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.