12
GitHub - TheComeUpCode/SpotifyGeneratePlaylist
source link: https://github.com/TheComeUpCode/SpotifyGeneratePlaylist
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
SpotifyGeneratePlaylist
A simple script that takes your liked videos on Youtube, and generates a Spotify playlist based on the song in your liked videos.
Table of Contents
Video
Check out the youtube video for a step by step walk through Youtube Video
Technologies
LocalSetup
-
Install All Dependencies
pip3 install -r requirements.txt
-
Collect You Spotify User ID and Oauth Token From Spotfiy and add it to secrets.py file
- To Collect your User ID, Log into Spotify then go here: Account Overview and its your Username
- To Collect your Oauth Token, Visit this url here: Get Oauth and click the Get Token button
-
Enable Oauth For Youtube and download the client_secrets.json
- Ok this part is tricky but its worth it! Just follow the guide here Set Up Youtube Oauth ! If you are having issues check this out Oauth Setup 2 and this one too Oauth Setup 3
-
Run the File
python3 create_playlist.py
- you'll immediately see
Please visit this URL to authorize this application: <some long url>
- click on it and log into your Google Account to collect the
authorization code
- you'll immediately see
ToDo
- Tests
- Add Error Handling
Troubleshooting
- Spotify Oauth token expires very quickly, If you come across a
KeyError
this could be caused by an expired token. So just refer back to step 3 in local setup, and generate a new token!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK