-
Notifications
You must be signed in to change notification settings - Fork 2
Home
BlankGodd edited this page May 28, 2020
·
4 revisions
Welcome to the BLyrics wiki!
BLyrics is a python client for leveraging the GENIUS API.
A CLI tool for interacting with Genius
It is also used for getting latest articles and song charts
-
Getting infomation
- Songs
- Artists
- Lyrics
- Annotations
-
Saving prefrences ⚡
- Artist Info
- Song info and lyrics
-
Latest information and articles
- Headliner from genius.com
- Oher articles
- Charts
- Python3
- Any Operating system
- An open mind
-
Install from PyPi
$ pip3 install blyricsFor getting song info and lyrics
- Params:
- song: song title
- Returns:
- dict: a dictionary of song information and lyrics
Usage:
>>>from blyrics import Package
>>>Package = Package()
>>>
>>>song_info = Package.search_song(song='No Role Modelz')
>>>
>>>song_lyrics = song_info['Lyrics']
>>>print(song_lyrics)For saving song info
- Params:
- song_info: value returned by search_song
>>>Package.save_song(song_info = song_info)
Saving Complete...
>>>For getting artist info
- Params:
- artist: artist name
- Returns:
- dict: a dictionary of artist information
Usage:
>>>artist_info = Package.search_artist(artist='Cole')
>>>twitter = artist_info['Twitter Handle']
>>>print(twitter)For saving artist info
- Params:
- artist_info: value returned by search_artist
>>>Package.save_artist(artist_info=artist_info)
Saving Complete...
>>>For getting song annotations
- Params:
- song_id: song id gotten from search_song
- Returns:
- annotations: list of annotations and other important information
Usage:
>>>song_id = song_info['song_id']
>>>annotations = Package.get_annotations(song_id=song_id)For getting links and titles of articles currently on the genius home page
- Returns:
- tuple: headliner and other articles
Usage:
>>>articles = Package.get_articles_links()
>>>print(aritcles)"""For getting an articles currently on the genius home page
- Params:
- link: article link gotten from get_article_links
- Returns:
- str: article content
Usage:
>>>headline = articles[0]
>>>links = [v for v in headline.values()]
>>>article = Package.get_article(link=links[0])
>>>print(article)For getting chart of top trending songs
- Returns:
- tuple: ranks, song title and artist name
>>>chart = Package.get_chart()
>>>for i in range(len(chart[0])):
... print(chart[0][i],' ',chart[1][i],' ',chart[2][i])- Issues: https://github.com/BlankGodd/BLyrics/issues
- Source Code: https://github.com/BlankGodd/BLyrics
Project licensed under the MIT license
- Nick: BlankGodd
- Email: blankgodd33@gmail.com
- Github: https://github.com/BlankGodd
- Twitter: @blankgodd_
(c) 2020 BlankGodd