Giter Site home page Giter Site logo

youtubetospotify's Introduction

youtubetospotify

A simple script to add all songs from youtube playlist to spotify playlist.

Example

What's different in version 2?

Faster: Uses Youtube API to get song info instead of selenium.
Convenient: No need to refresh token after every hour.
Reliable: Adds 85-95% of the songs from popular youtube playlists.

Note

Works only for public youtube playlists.

Stats

Added 142 songs to spotify playlist out of 150 songs from youtube playlist

Setup

1.Create an app: https://developer.spotify.com/dashboard/applications

2.Copy the Client id and client secret

3.Set redirect uri to http://localhost:8888/callback

Get youtube API key

CLICK HERE TO SEE HOW TO CREATE YOUTUBE API KEY

Setting Environment Variables Mac and Linux

  1. Rename the file .env.sample to .env

  2. Edit the file by adding your credentials

  3. Run the following command to set your environment variable source .env

Setting Environment Variables (Windows)

set SPOTIFY_USER_ID <your_user_id>  
set SPOTIFY_CLIENT_ID <your_client_id>  
set SPOTIFY_CLIENT_SECRET <your_client_secret>  
set SPOTIFY_REDIRECT_URI 'http://localhost:8888/callback'  
set YOUTUBE_API_KEY <your_youtube_api_key> 

Usage

$ python main.py

Output

Enter youtube playlist id: PLgzTt0k8mXzEpH7-dOCHqRZOsakqXmzmG
Enter a name for your spotify playlist: youtube_chill_songs   

The Chainsmokers - Takeaway was added to playlist.
KIRBY-Don't Leave Your Girl was not found!
Lauv - There's No Way was added to playlist.
.
.
.
Usher - Crash was added to playlist.

Example

Result

youtubetospotify's People

Contributors

ignisda avatar espoirmur avatar

Watchers

James Cloos 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.