GithubHelp home page GithubHelp logo

rohan-cod / music_playlist Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 15.0 145 KB

A Django app to add songs liked by you on YouTube to a Spotify | Apple Music playlist.

License: MIT License

Python 53.43% HTML 46.57%
python django css html bootstrap javascript ajax jquery pipenv gunicorn

music_playlist's Introduction

Music Playlist App

A Web Application maade using the Django framework to automatically add songs liked by you on YouTube to a Spotify | Apple Music playlist. ๐ŸŽง

Configuration Required

  • Go to songs/spotify.py. Add your Spotify Oauth Token to the spotify_token variable and Spotify user_id to the spotify_user_id variable. To get user_id click here. To get Oauth Token click here.
  • Go to songs/apple_music.py. Add your Apple music token to the apple_music_token variable.
  • Go to songs/client_secret.json. Replace the complete contents of the file with the contents of your client_secret.json file that you can download after enabling Oauth for YouTube from here.

Steps to get the Oauth Token from Spotify

  • Login to your Spotify account and get your username.
  • The username will be your Spotify user_id.
  • Now, get the Oauth token by entering your user_id and then click Get Token.
  • In the scope options, select the required scopes.
  • It will generate a Spotify token and note that this token expires every once in a while. So, if you face any issue with accessing your Spotify Playlist, it may be because your token might have expired. In that case, create a new token by repeating the above process.

Steps to get the Oauth for Youtube

  • Login to the Google Cloud Platform
  • Create a new project by entering your project name.
  • Now enable the the api (YouTube Data API v3) by selecting the "ENABLE APIS AND SERVICES" option.
  • After enabling the api, crete your credentials by clicking the "Credentials" in the sidebar.
  • Now press the "+ CREATE CREDENTIALS" option and then select the OAuth Client ID
  • Click on "CONFIGURE CONSENT SCREEN" and it redirect to OAuth consent screen.
  • Select the External option in the User type and then proceed.
  • Now, fill out the required fields and proceed forward. (Note: In the scopes section go through all the options and select the ones you think will be necessary)
  • In the Test Users section, add your email address and then save and continue.
  • Now, head back to the Credentials section in the sidebar and create the OAuth client ID.
  • Select the application type to be "Web application".
  • Now, in the "Authorized redirect URIs" add your local url of the django app. (It may look like "http://127.0.0.1:8000/")
  • After entering all the details, save it and then an OAuth client ID will be created.
  • Now download the json file by clicking on the download symbol next to your client ID.
  • Copy the contents of the json file and paste it inside the client_secret.json file in your projects folder.

Note that in the above method, it is mentioned that the app is a web application, so for it work the app needs to deployed first. So, use heroku to deploy the app in the web.

Requirements

Setting up the Project

  • Download and install Python 3.7
  • Download and install Git.
  • Fork the Repository.
  • Clone the repository to your local machine $ git clone https://github.com/<your-github-username>/Music_Playlist.git
  • Change directory to Music_Playlist $ cd Music_Playlist
  • Install pipenv $ pip3 install pipenv
  • Create a virtual environment and install all requirements from Pipfile $ pipenv install
  • Activate the env: $ pipenv shell
  • Make migrations $ python manage.py makemigrations
  • Migrate the changes to the database $ python manage.py migrate
  • Create superuser $ python manage.py createsuperuser
  • Run the server $ python manage.py runserver

Contributing

If you are new to open source you can first read about git by clicking here.

Communtiy Slack Channel

To get started, the first step is to meet the community. We use slack to communicate, and there the helpful community will guide you. Slack is an instant messaging service used by developers and users of GitHub. It uses chatrooms, where developers can join in and can talk about a particular topic. Click here to join our Slack Workspace.

Code of Conduct

Check code of conduct here

Communities for extenxive bussiness

Artists Developers Advertising Investors Vendors

music_playlist's People

Contributors

ankitsingh18 avatar chandlerbing52 avatar cynideschizo avatar dependabot[bot] avatar jaisaikr avatar rocker4 avatar rohan-cod avatar shubhdeeprajput avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

music_playlist's Issues

Update README

Update the README by adding the step by step procedure on how to get the OAuth credentials from Youtube(screenshots can be used for clear understanding). Also, add a note regarding the KeyValue Error (which occurs due to the Expired Spotify token).
Add a new point in the "Setting up the project" regarding the deployment of the app.

Support

Add support for more apps like gaana, etc.

Delete

Add functionality to delete playlists.

Apple Music user token

Is it possible to have a guide on how to generate the Apple Music user token via Python? Thanks.

Email

Add option to email the list of the songs with link to the user.

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.