![]() |
VOOZH | about |
In this article, we are going to write a python script to extract lyrics from the song and bind with its GUI application. We will use lyrics-extractor to get lyrics of a song just by passing in the song name, it extracts and returns the song's title and song lyrics from various websites. Before starting, install the lyrics-extractor module. Run this command into your terminal.
pip install lyrics-extractorNeed an API Key and Engine ID of Google Custom Search JSON API.
Engine ID
Choose any link of one to get your search engine:
https://genius.com/
https://lyricsted.com/
http://www.lyricsbell.com/
https://glamsham.com/
http://www.lyricsoff.com/
https://lyricsmint.com/
JSON API :
Approach:
from lyrics_extractor import SongLyrics extract_lyrics = SongLyrics(Your_API_KEY, GCS_ENGINE_ID)extract_lyrics.get_lyrics("Shape of You")Below is the implementation.
Output:
Note: Enter your own API key and engine id otherwise it will generate an error.
Extract lyrics Application with Tkinter: