animelyrics-0.1.0
توضیحات
Library to extract song lyrics from www.animelyrics.com
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | animelyrics-0.1.0 |
| نام | animelyrics |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Melvin Yeo |
| ایمیل نویسنده | melvinyzw@gmail.com |
| آدرس صفحه اصلی | https://github.com/colorfusion/animelyrics |
| آدرس اینترنتی | https://pypi.org/project/animelyrics/ |
| مجوز | MIT |
# animelyrics
[](https://travis-ci.com/colorfusion/animelyrics) [](https://coveralls.io/github/colorfusion/animelyrics?branch=master) [](https://github.com/ambv/black) [](https://www.python.org/) [](https://lbesson.mit-license.org/)
>Python API to retrieve song lyrics from [animelyrics](https://www.animelyrics.com).
## Features
- Search for lyrics from [animelyrics](https://www.animelyrics.com) website
- Japanese (romaji) and english translated text support
- Show title on top of lyrics
## Prerequisties
- Python >=3.0.0
## Install
```sh
pip install animelyrics
```
Simple! 🎉
## Usage
```python
import animelyrics
print(animelyrics.search_lyrics("renai circulation"))
```
### Multi-language search
The language of the lyrics can be specified using the `lang` argument during the function call:
```python
import animelyrics
print(animelyrics.search_lyrics("god knows", lang="en"))
```
Currently the API only supports the following inputs
- `jp` - romaji text
- `en` - translated english text
### Song Titles
To add the song title and the anime where it came from to the lyrics, use the `show_title` argument
```python
import animelyrics
print(animelyrics.search_lyrics("snow halation", show_title=True))
```
### Exceptions
The API contains the following exception that will be raised in different scenarios
- `InvalidLanguage`
- `MissingTranslatedLyrics`
- `NoLyricsFound`
The following example shows how to cover all exceptions while searching for lyrics:
```python
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 found
```
## Test
```sh
python setup.py test
```
## Author
### 🕺 Melvin Yeo
- GitHub: [@colorfusion](https://github.com/colorfusion)
## 🤝 Contributing
Contributions, issues, and feature requests are welcome!"<br>
Check out the [issues page](https://github.com/colorfusion/animelyrics/issues)
## Support
Please ⭐ this repository if it is helpful to you!
## License
Copyright © 2019 Melvin Yeo.<br>
This project is [MIT](https://github.com/colorfusion/animelyrics/blob/master/LICENSE) licensed.
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
| - | |
| - | beautifulsoup4 |
| - | lxml |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.0.0 | Python |
نحوه نصب
نصب پکیج whl animelyrics-0.1.0:
pip install animelyrics-0.1.0.whl
نصب پکیج tar.gz animelyrics-0.1.0:
pip install animelyrics-0.1.0.tar.gz