Skip to content

Python script showing the lyrics from the current song being played on Spotify

License

Notifications You must be signed in to change notification settings

Laurent-Andrieu/Spotify-Lyrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify-Lyrics

This python script allows you to see the lyrics of your current playing song on Spotify.

Spotify Developer


Clone the repository

Windows Users

Linux Users

  • 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.


Requirements

  • Type pip install spotipy --upgrade in your terminal

Spotipy documentation

For windows users:


Create your spotify app

Developer portal

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)

Use Spotify-Lyrics

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.


Future immplements

  • 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.

Commit info

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

About

Python script showing the lyrics from the current song being played on Spotify

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages