This python script allows you to see the lyrics of your current playing song on Spotify.
- Download & Install Git Bash
- Type
sudo apt install git
on your terminal
After Git installation type git clone https://github.com/Laurent-Andrieu/Spotify-Lyrics/
to clone the repository.
- Type
pip install spotipy --upgrade
in your terminal
Log in the Developer portal with your account and create and app.
Once created, go to EDIT SETTINGS > Redirect URIs and add any link to your local machine, targetting any free port (eg : https://localhost:8000
)
To run the program, simply call this file. Before you run it, make sure you add your Profile ID, your CLIENT_ID and CLIENT_SECRET from the Developer portal.
You can find your Profile ID by going to your account on the Spotify App and click on ...
> Share
> Copy the Spotify URI. (eg : spotify:user:213tzif5o7rzyxtijuqdgtfuq
)
This program contains the SetCreditential
Class witch will add your IDs in environement variables passed by the Connexion
Class.
The Connexion
Class performs the connexion throught the Authorization Code Flow authentification method via the get_token()
function.
It also allows you to call the track_data()
function to retrive the author and name of the song being played.
Scrapes Genius for the song returned by Spotify.Connexion().track_data()
. Also requires the full path of your gecko driver to work.
Searches for the song's 'mini card' and returns its href.
Call start_driver()
and window_handle()
to start the browser and to handle closing errors.
Call search()
to get the link and then call browse()
to open that page.
Searches for the lyrics of the song. Returns the lyrics in plain text format.
Initiate an object with Find
class by passing it the href. Then call print_
or store Find.lyrics
to get the result.
-
Terminal.py
: Lyrics display. Prints the lyrics on a terminal. -
View.py
: GUI. Allows the user to see the lyrics on an python based small application. -
Higlight.py
: Current lyrics higlighting. Highlights the lyrics in realtime.
Author | Date | Improvements |
---|---|---|
Laurent Andrieu | Jun 05 2020 16:32pm | - [x] README.md |
- [x] Version 2 repository | ||
- [x] Lyrics.py |
||
- [x] Driver.py |
||
- [x] Run.py |