Giter VIP home page Giter VIP logo

ym2s's Introduction

yandex2spotify

A simple Python script that allows to import favorite tracks, playlists, albums, and artists from Yandex.Music to Spotify

Installation

Requires Python 3.8 or higher.

pip3 install -r requirements.txt

Usage

  1. Register a dummy Spotify OAuth application and add https://open.spotify.com as a callback URI in its settings.

  2. Obtain a Yandex.Music OAuth token.1

  3. Run the script using Client ID and Client Secret copied from your app's Spotify dashboard:

python3 importer.py --id <spotify_client_id> --secret <spotify_client_secret> -u <spotify_username> -t <yandex_token>
  1. If you don't want to import some items (likes, playlists, albums, artists) you can exclude them by specifying the -i/--ignore argument, for example:
python3 importer.py --id <spotify_client_id> --secret <spotify_client_secret> -u <spotify_username> -t <yandex_token> -i playlists albums artists
  1. After launch, script will open the web browser with authorization dialog. After finishing authorization, you need to copy resulting URL, close browser tab and paste that URL after Enter the URL you were redirected to:

  2. If authorization succeed - you will see log of import process.

JSON import is also available. Use --json-path or -j to specify path to JSON file in format described below.

[
	{
		"artist": "Artist Name",
		"track": "Track Name"
	},
	{
		"artist": "Artist Name",
		"track": "Track Name"
	},
	...
]

Footnotes

  1. Since it's impossible to register an OAuth application with Yandex.Music access scope, you have to reuse the token from music.yandex.ru itself. โ†ฉ

ym2s's People

Contributors

lemonpaul avatar glebliutsko avatar marshalx avatar ticclick avatar karma-git avatar strangeman avatar k1mst0n avatar horseunnamed avatar sntxerror avatar olegkron avatar anissimov58 avatar dependabot[bot] avatar landat avatar

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.