MusicSearch is a Python project for searching song lyrics. This repository contains two versions:
- MusicSearch_ver1: Uses Lyrics.com for fetching lyrics.
- MusicSearch_ver2: Uses the Genius API for fetching lyrics and optionally downloading audio from YouTube.
- Python 3.8 or higher
pipinstalled- Optional (for MusicSearch_ver2 audio downloads):
yt-dlpinstalled and available in PATH
- Clone the repository:
git clone https://github.com/IanTheMitten/MusicSearch.git
cd MusicSearch- Install Python dependencies:
pip install -r requirements.txt- Navigate to the folder:
cd MusicSearch- Run the script:
python MusicSearch_ver1.py- Follow on-screen instructions to search for lyrics.
Note: Version 1 scrapes Lyrics.com. It may break if the website layout changes.
- Go to Genius Developers.
- Log in or create an account.
- Click Create an API Client.
- Fill in the required fields (App name, website, etc.) and submit.
- Copy the Access Token.
You can either:
- Set an environment variable (recommended):
export GENIUS_CLIENT_ACCESS_TOKEN="your_access_token_here" # macOS/Linux
setx GENIUS_CLIENT_ACCESS_TOKEN "your_access_token_here" # Windows- Or paste the token when prompted by the script (less secure for public repos).
- Navigate to the folder:
cd MusicSearch- Run the script:
python MusicSearch_ver2.py- Paste a lyrics snippet when prompted.
- Select a song from the search results to view full lyrics.
- Optionally, download audio from YouTube by following prompts (requires
yt-dlp).
Audio download details:
- Default format:
mp3 - Supported formats:
mp3,m4a,webm,aac,wav,flac - yt-dlp automatically downloads the top YouTube search result matching
artist + title + audio.
- Version 1 scrapes Lyrics.com; results may break if the site layout changes.
- Version 2 uses Genius API, which is more reliable.
- Respect Genius API rate limits when running searches.
- Ensure
yt-dlpis installed if you want audio downloads.
MIT License