https://github.com/bharatkalluri/lyricfetcher
A Package/API/Command Line application to search lyrics from different web sources
https://github.com/bharatkalluri/lyricfetcher
api cli-app lyrics python python-library python3
Last synced: about 1 year ago
JSON representation
A Package/API/Command Line application to search lyrics from different web sources
- Host: GitHub
- URL: https://github.com/bharatkalluri/lyricfetcher
- Owner: BharatKalluri
- Created: 2017-01-15T21:48:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-08-06T05:21:57.000Z (almost 4 years ago)
- Last Synced: 2024-11-12T07:52:41.481Z (over 1 year ago)
- Topics: api, cli-app, lyrics, python, python-library, python3
- Language: Python
- Homepage:
- Size: 48.8 KB
- Stars: 28
- Watchers: 3
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# PyLyricFetcher 🔥🔥
A Package/Command line app and API to search lyrics from different web sources
#### Note: All the lyrics are scraped from a public web pages of their respective domains, Please do not use this in Production as it is not allowed by the scraped website.Use this at your own discretion.
# [LyricFetcher](https://github.com/BharatKalluri/lyricfetcher/tree/master/lyricfetcher)
[](https://travis-ci.org/BharatKalluri/lyricfetcher)
[](https://badge.fury.io/py/lyricfetcher)
[](https://codeclimate.com/github/BharatKalluri/lyricfetcher)
A python Package/Command Line Utility to get the lyrics of a Song
To install the package
```bash
pip install lyricfetcher
```
and import and use
```bash
>>> import lyricfetcher
>>> print(lyricfetcher.get_lyrics('azlyrics','linkin park','numb'))
```
or, You can use it directly from the terminal
```bash
# For help, just type
lyricfetcher -h
# Just call lyricfetcher, with the artist name and song name
lyricfetcher eminem "lose yourself"
# Or just indicate a --source and you are good to go!
lyricfetcher --source lyricswikia eminem "lose yourself"
```
This prints out all the lyrics of linkin parks's awesome song
## Options
The get_lyrics takes 3 arguments
+ Source
+ metrolyrics - source of information will be metrolyrics.com
+ LyricsWikia - Queries lyrics.wikia.com for song lyrics
+ genius - genius.com , you get it
+ Artist - The second argument takes in the name of the artist seperated by spaces
+ Song - The song name speprated by spaces
And returns the lyrics in text form!
# API
The API is hosted at pylyricfetcher.herokuapp.com. It is written using the super fast
[Sanic](https://github.com/channelcat/sanic) as the backend. (Please be patient if your
first call is slow, as it uses Heroku free plan so the vm takes time to start)
## API calls
An example call to the API can be as follows
Usage : http://pylyricfetcher.herokuapp.com/api/lyricswikia/ArtistName/SongName
Example: https://pylyricfetcher.herokuapp.com/api/lyricswikia/eminem/berzerk
to retrive the lyrics of berzerk from lyrics wikia. Try it Out!
There are the following sources as of now
+ lyricswikia
+ MetroLyrics
+ Genius
The next arguments are the Artist name and the Song name!