spotify must be running and a song must be playing
run python pylyrics.py
for CLI mode
OR
run python pylyricsgui.py
for GUI mode
OR
for macOS:
set up an Automator app to run /path/to/pylyricsgui.py
OR
for windows:
download PyLyrics.exe
from releases and run
-
windows: get the title of the spotify window, which contains the song and artist
macOS: use osascript to execute applescript that gets info for currently playing song
-
create a search query in the format: song + artist(replacing all spaces with '+')
-
plug in the query to genius search api url
-
find lyrics url from response
-
send get request to lyrics url
-
scrape lyrics from html
-
display the lyrics!
Icon made by FreePik from www.flaticon.com. Original icon was modified for this project.