Coder Social home page Coder Social logo

csv_to_ytmusic's Introduction

spotify_to_ytmusic

PyPI Downloads Ask questions at Discussions Code coverage Latest release Commits since latest release

A simple command line script to clone a Spotify playlist to YouTube Music.

  • Transfer a single Spotify playlist
  • Update a transferred playlist on YouTube Music
  • Transfer all playlists for a Spotify user
  • Remove playlists from YouTube Music

Install

pip install spotify_to_ytmusic

Setup

  1. Generate a new app at https://developer.spotify.com/dashboard
  2. Run
spotify_to_ytmusic setup

For backwards compatibility you can also create your own file and pass it using --file settings.ini.

If you want to transfer private playlists from Spotify (i.e. liked songs), choose "yes" for oAuth authentication, otherwise choose "no". For oAuth authentication you should set http://localhost as redirect URI for your app in Spotify's developer dashboard.

Usage

After you've completed setup, you can simply run the script from the command line using:

spotify_to_ytmusic create <spotifylink>

where <spotifylink> is a link like https://open.spotify.com/playlist/0S0cuX8pnvmF7gA47Eu63M

The script will log its progress and output songs that were not found in YouTube Music to noresults_youtube.txt.

Transfer all playlists of a Spotify user

For migration purposes, it is possible to transfer all public playlists of a user by using the Spotify user's ID (unique username).

spotify_to_ytmusic all <spotifyuserid>

Transfer liked tracks of the Spotify user

You must you oAuth authentication for transferring liked songs.

spotify_to_ytmusic liked

This command will open browser where you should give access to your account (if you haven't done that before). After authorization you will be redirected to localhost, copy link you were redirected to (looks like localhost/?code=...) and paste to command line.

Command line options

There are some additional command line options for setting the playlist name and determining whether it's public or not. To view them, run

spotify_to_ytmusic -h

To view subcommand help, run i.e.

spotify_to_ytmusic setup -h

Available subcommands:

positional arguments:
  {setup,create,update,remove,all}
                        Provide a subcommand
    setup               Set up credentials
    create              Create a new playlist on YouTube Music.
    update              Delete all entries in the provided Google Play Music playlist and update the playlist with entries from the Spotify playlist.
    remove              Remove playlists with specified regex pattern.
    all                 Transfer all public playlists of the specified user (Spotify User ID).

options:
  -h, --help            show this help message and exit

csv_to_ytmusic's People

Contributors

sigma67 avatar webns avatar rolln-dev avatar benthillerkus avatar griffobeid avatar lmagasweran-sc avatar mrmbernardi avatar tgrrr avatar necrolyte2 avatar borodean avatar demesm avatar dottemechy 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.