Code Monkey home page Code Monkey logo

google-music-spotify-importer's Introduction

Google Music To Spotify

This tool exports the user's Google Music playlists to spotify.

Usage

  1. pipenv install
  2. pipenv shell
  3. python3 main

See --help for detailed flag usage.

Obtaining your Google device ID

Google does not have a public api for Google Music. As a consquence using this script violates the Google's terms of use. You have been warned. In order to make requests we must spoof a device that is already connected to your Google Music account. Fortuantely our Google Music library, simon-weber/gmusicapi, does most of the work. The easiest way to get a device id is for you to supply a dummy one on the command line, this will crash the app, but Google returns your device IDs in the error message (nice).

Obtaining your Spotify Client ID and Secret

  1. Visit your spotify developer dashboard
  2. Create an app, the Client ID and Secret Should be immediately visible
  3. Click "Edit Settings"
  4. Add "http://localhost/" to "Redirect URIs". During the first execution of the script this will open your browser, authenticate you with Spotify then redirect you to "http://localhost/?code=...". Copy this URL (yes the entire thing) into your terminal when prompted.

Favorites Playlist

Spotify and Google Music don't exactly see eye-to-eye on what they consider ways to favorite a track. Google allows you to "thumbs up" tracks that you like. Spotify allows you to save tracks you like and add them to playlists. When you save a track or add it to a playlist Spotify infers that you like the song. To import your Google "thumbs up" I recommend creating a new playlist from your "thumbs up"ed tracks. Unfortunately the pre-created auto playlist is not accessible from outside of an official client so you will need to export these to a new playlist. To do so, go to your "playlists" page in Google music find "Thumbs up" in the "Auto-playlists" section. Mouse over it, and click the three-dots menu, select "Add playlist to playlist" > "New Playlist". When you specify --favorites-playlist make sure to supply the same name (capitilization matters!).

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.