A Python 3.5 script that tweets about new releases of artists that you follow.
What it does
- Logs on to your Spotify account (via Web-API developer.spotify.com/web-api/ using spotipy).
- Gets all your followed artists.
- Gets for all those artists the latest n albums, singles or appearances.
- Checks if there are new albums for an artist since the last time it checked (last update is saved in an external file).
- Tweets about all new releases since the last update (using Twython).
If you want to use it
- Clone/download repository.
- Use Python 3.5.
- Install missing python modules (follow the error messages).
- Rename
rename_to_config.pytoconfig.pyand enter the missing API information (Twitter and Spotify) - Run
main.pywith Python 3.5.
Is using
- spotipy spotipy.readthedocs.io/en/latest/
- Twython twython.readthedocs.io/en/latest/
Todo
- Log to a file.
- Remember already sent tweets (because some albums do have due to a bug a release date in the future leading to one tweet every day).
- Tutorial on how to run the script on a Raspberry Pi with crontab
- Long-term test to check for special cases which are not dealt with right now.
- Code optimization.