Autmatically search for lyrics and write them into the mp3-tag of a file.
Go to file
2021-09-29 15:39:48 +02:00
nicole Added info for test-run 2021-09-29 15:35:14 +02:00
LICENSE Initial commit 2021-09-29 04:20:27 +02:00
README.md Changed README 2021-09-29 15:39:48 +02:00
setup.py Initial commit 2021-09-29 04:20:27 +02:00

Nicole - Lyrics Scraper

Overview

Nicole is a program that searches for lyrics and writes them into the mp3-tag.

Unfortunately, there needs to be a 5 second delay between each request to azlyrics.com because the site will block your ip for a while if you send many requests.

Files

Nicole supports FLAC and mp3 files. Other files can not be edited (as of now). Files that do not have a .flac or .mp3 extension are skipped automatically.

  • mp3: lyrics are stored in "USLT" tag as "lyrics- "
  • flac: lyrics are stored as vorbis-comment with key "LYRICS"

History

Nicole creates a history of all files that were processed in ~/.configs/nicole. If a file is in the history, it will be skipped unless ignore_history=True. If the lyrics for a file can not be obtained, it is added to ~/.configs/nicole/failed_files. Those files are not skipped, the file only exists so that you can see which lyrics were not downloaded.

If you dont want your files in the history, add the -n option.

azlyrics

Nicole creates an azlyrics.com url from the "title" and "artist" tags of the file. The lyrics are extracted from the html document using regex.

Usage

Command line options:

  • -d [directory] process directory [directory]

  • -f [file] process file [file]

  • -r go through directories recursively

  • -s silent, no command-line output

  • -i ignore history

  • -n do not write to history

  • -o overwrite if the file already a lyrics

  • -t test, do not write lyrics to file, but print to console

  • -h show this

  • --rm_explicit remove the "[Explicit]" lyrics warning from the song's title tag

If you do not specify a directory or file, the program will ask you if you want to use the current working directory.

Installation

Clone this repository and install it using python-pip. pip should also install https://github.com/seebye/mutagen, which is needed to read and write the mp3-tags.

cd ~/Downloads
git clone https://github.com/MatthiasQuintern/nicole.git
cd nicole
python3 -m pip install .

You can also install it system-wide using sudo python3 -m pip install.

Importand Notice

This software comes with no warranty!