Python API to retrieve song lyrics from animelyrics.
- Search for lyrics from animelyrics website
- Japanese (romaji) and english translated text support
- Show title on top of lyrics
- Python >=3.0.0
pip install animelyricsSimple! 🎉
import animelyrics
print(animelyrics.search_lyrics("renai circulation"))The language of the lyrics can be specified using the lang argument during the function call:
import animelyrics
print(animelyrics.search_lyrics("god knows", lang="en"))Currently the API only supports the following inputs
jp- romaji texten- translated english text
To add the song title, and anime title to the lyrics, use the show_title argument
import animelyrics
print(animelyrics.search_lyrics("snow halation", show_title=True))The API contains the following exception that will be raised in different scenarios
InvalidLanguageMissingTranslatedLyricsNoLyricsFound
The following example shows how to cover all exceptions while searching for lyrics:
import animelyrics
try:
lyrics = animelyrics.search_lyrics("song lyrics")
except animelyrics.MissingTranslatedLyrics:
# case when english language is used but no translation is found
except animelyrics.NoLyricsFound:
# case when no lyrics are foundpython setup.py test- GitHub: @colorfusion
Contributions, issues, and feature requests are welcome!"
Check out the issues page
Please ⭐ this repository if it is helpful to you!
Copyright © 2019 Melvin Yeo.
This project is MIT licensed.