- Spotify has a Discover Weekly Playlist which has new songs every week. I use it all the time for discovering new music and I also save a lot of these songs to my library to listen to after the week is over.
- My problem was that I either didn't get around to listening to the full playlist within the week or I incorrectly remembered saving songs to my library. Then, after the week was over I lost those songs forever and missed the chance of finding my new favorite song.
- This script (when setup with a scheduler) will automatically create a copy of the Discover Weekly playlist every week so that you don't need to worry about losing your music after the week is done.
- Clone this repository, e.g.
git clone https://github.com/VishalRamesh50/spotify-weekly-scheduler.git
- Copy
.vscode.example
to.vscode
to get linting settings (optional)cp -r .vscode.example .vscode
- Copy
.env.example
to.env
cp .env.example .env
- Replace the
SPOTIFY_USERNAME
andSPOTIFY_PASSWORD
in the.env
file for the desired user. - Install dependencies
pip3 install -r requirements.txt poetry install
- Run the program!
poetry run python main.py
-
Add the following buildpacks
-
Add these config/environment variables
CHROMEDRIVER_PATH
=/app/.chromedriver/bin/chromedriverGOOGLE_CHROME_BIN
=/app/.apt/usr/bin/google-chromeSPOTIFY_USERNAME
=your_spotify_usernameSPOTIFY_PASSWORD
=your_spotify_password
Note: This application does not store or send your username and password anywhere. However, they are necessary in order to give this application access to read/create your private Spotify playlists. You can learn more about Spotify Authorization Flow here. You can learn more about Spotify Authorization Scopes here.
- Add a scheduling extension of your choice and let it run this shell script every Monday:
What I Use: Advanced Scheduler
poetry install --no-dev && poetry run python main.py